From: Ingo Molnar <mingo@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
David Ahern <dsahern@gmail.com>,
acme@ghostprotocols.net, linux-kernel@vger.kernel.org,
Frederic Weisbecker <fweisbec@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Mike Galbraith <efault@gmx.de>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] perf record: mmap output file - v2
Date: Tue, 15 Oct 2013 15:20:03 +0200 [thread overview]
Message-ID: <20131015132003.GF2402@gmail.com> (raw)
In-Reply-To: <20131015122232.GA4942@krava.redhat.com>
* Jiri Olsa <jolsa@redhat.com> wrote:
> On Tue, Oct 15, 2013 at 09:25:40AM +0200, Ingo Molnar wrote:
> >
> > * Namhyung Kim <namhyung@kernel.org> 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
next prev parent reply other threads:[~2013-10-15 13:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 2:55 [PATCH] perf record: mmap output file - v2 David Ahern
2013-10-15 6:02 ` Ingo Molnar
2013-10-15 7:09 ` Namhyung Kim
2013-10-15 7:25 ` Ingo Molnar
2013-10-15 8:17 ` Namhyung Kim
2013-10-15 12:22 ` Jiri Olsa
2013-10-15 13:20 ` Ingo Molnar [this message]
2013-10-15 13:25 ` David Ahern
2013-10-16 1:24 ` Namhyung Kim
2013-10-15 7:31 ` Namhyung Kim
2013-10-15 7:44 ` Ingo Molnar
2013-10-15 13:45 ` David Ahern
2013-10-15 13:35 ` David Ahern
2013-10-16 1:52 ` Namhyung Kim
2013-10-16 1:58 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131015132003.GF2402@gmail.com \
--to=mingo@kernel.org \
--cc=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.