* Jiri Olsa <[email protected]> wrote:

> On Tue, Oct 15, 2013 at 09:25:40AM +0200, Ingo Molnar wrote:
> > 
> > * Namhyung Kim <[email protected]> wrote:
> > 
> > > > 3)
> > > >
> > > > The rec->bytes_at_mmap_start field feels a bit weird. If I read the 
> > > > code 
> > > > correctly, in every 'perf record' invocation, rec->bytes_written starts 
> > > > at 
> > > > 0 - i.e. we don't have repeat invocations of cmd_record().
> > > 
> > > rec->bytes_written is updated when it writes to the output file for 
> > > synthesizing COMM/MMAP events (this mmap output is not used at that 
> > > time).
> > 
> > Btw., while looking into it, I think advance_output() needlessly 
> > obfuscates as well:
> > 
> > static void advance_output(struct perf_record *rec, size_t size)
> > {
> >         rec->bytes_written += size;
> > }
> > 
> > that code should just be written open coded.
> > 
> > So I think all this needs a few good rounds of cleanups, before we can 
> > complicate it with a new feature. (the cleanups can be on top of the 
> > feature, if they go in at the same time.)
> 
> I sent some file code cleanup week ago, I'll rebase and resend it soon:
>
> http://marc.info/?l=linux-kernel&m=138113836428425&w=2

Nice!

> it's mostly about centralizing the code into file object.. got no 
> comments so far

Too much development going on I suspect :-)

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
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