[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150519201854.GD19921@kernel.org>
Date: Tue, 19 May 2015 17:18:54 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
LKML <linux-kernel@...r.kernel.org>,
David Ahern <dsahern@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Andi Kleen <andi@...stfloor.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 35/40] perf record: Synthesize COMM event for a command
line workload
Em Tue, May 19, 2015 at 09:49:03PM +0200, Jiri Olsa escreveu:
> On Wed, May 20, 2015 at 12:12:45AM +0900, Namhyung Kim wrote:
>
> SNIP
>
> > > > >
> > > > > This looks reasonable, but I think it probably needs to be done
> > > > > somewhere in perf_evlist__prepare_workload() or
> > > > > perf_evlist__start_workload(), as this affects other tools as well, like
> > > > > 'top', 'trace' and any other that may want to do this start-workload use
> > > > > case.
> > > >
> > > > Hmm.. I need to look at this again as it only affects on processing
> > > > indexed data files which used to have a separate missing threads tree.
> > >
> > > Humm, you're thinking about where you managed to reproduce the problem,
> > > I am thinking outside indexing, etc, i.e. by definition we either enable
> > > the event before we fork, so that we get the PERF_RECORD_FORK/COMM or we
> > > synthesize it either from /proc or directly (preferred) if we decide to
> > > do it after the fork/exec, right?
> >
> > But as I said before, later COMM event will override thread->comm to a
> > proper string as long as it can find a matching thread. So I think it
> > has no problem in the current code.
> I can see the issue in the current script code and the patch cured it ;-)
Exactly, this is my point, this is not something new :-)
- Arnaldo
> before:
>
> [jolsa@...va perf]$ ./perf record -o - true | ./perf script
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.000 MB - ]
> :29236 29236 350869.479255: 1 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> :29236 29236 350869.479260: 1 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> :29236 29236 350869.479261: 7 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> :29236 29236 350869.479263: 122 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> :29236 29236 350869.479264: 2303 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> :29236 29236 350869.479266: 49582 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> true 29236 350869.479283: 1041734 cycles: ffffffff81190a4a perf_output_begin ([kernel.kallsyms])
>
> after:
>
> [jolsa@...va perf]$ ./perf record -o - true | ./perf script
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.000 MB - ]
> perf 28041 350801.438466: 1 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> perf 28041 350801.438471: 1 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> perf 28041 350801.438472: 7 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> perf 28041 350801.438473: 140 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> perf 28041 350801.438475: 3721 cycles: ffffffff8105e8aa native_write_msr_safe ([kernel.kallsy
> perf 28041 350801.438476: 94744 cycles: ffffffff8118e270 perf_event_comm ([kernel.kallsyms])
> true 28041 350801.438508: 1604677 cycles: ffffffff811d0781 do_mmap_pgoff ([kernel.kallsyms])
>
> jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists