On Tue, 15 Oct 2013 09:25:40 +0200, Ingo Molnar wrote:
> * Namhyung Kim <namhy...@kernel.org> wrote:
>> No, st_size is bigger than rec->bytes_written due to the 
>> perf_file_header which is written without updating rec->bytes_written.
>
> Since all this is code that executes once during __cmd_record(), is this 
> all about the header writeout?
>
> That is what confused me about the stat() call and that's messy really: we 
> are the ones who write the file header, we have a very good idea about how 
> many bytes we wrote to the file! It should be entirely unnecessary to lose 
> that information and then execute a system call to recover that 
> information...

Right, I think session->header.data_offset has the info already.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to