From: "David S. Ahern" <daahern@cisco.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Ingo Molnar" <mingo@elte.hu>,
"Peter Zijlstra" <peterz@infradead.org>,
"Stephane Eranian" <eranian@google.com>,
"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [PATCH 2/2] perf tools: Add option to show time history of event samples
Date: Tue, 30 Nov 2010 12:36:44 -0700 [thread overview]
Message-ID: <4CF5524C.5090900@cisco.com> (raw)
In-Reply-To: <20101130191905.GB9706@ghostprotocols.net>
On 11/30/10 12:19, Arnaldo Carvalho de Melo wrote:
>
> Suggestion: Please put some example output on the commit log message,
> that way reviewers can have a glimpse of how it looks like.
>
Will do. I actually had a comparison between today's 'report -D' and
'report --timehist'; I forgot to add it to the commit message.
The line lengths will be a bit ugly in an email. In practice, the
timehist is primarily a means of converting event data to sensible text
for 1. processing by scripts and gnuplot, and 2. correlating with log
entries from individual processes.
In case folks are interested now before generating another patch set:
./perf record --timehist -e cs -c 1 -p 983 -g
./perf report -D
0x1200 [0x88]: PERF_RECORD_SAMPLE(IP, 1): 983/983: 0xffffffff813e974f
period: 1 cpu:1
... chain: nr:11
..... 0: ffffffffffffff80
..... 1: ffffffff813e974f
..... 2: ffffffff813ea46d
..... 3: ffffffff813ea549
..... 4: ffffffff8111cf61
..... 5: ffffffff8111d7eb
..... 6: ffffffff8111d9a3
..... 7: ffffffff8111dad8
..... 8: ffffffff81002cf2
..... 9: fffffffffffffe00
..... 10: 00007f2e0d15dec3
... thread: sshd:983
...... dso: /lib/modules/2.6.37-rc2/build/vmlinux
./perf report --timehist -U
12:26:41.890762 105188460714 1 sshd 983 ffffffff813e974f schedule
([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 ffffffff813ea46d
schedule_hrtimeout_range_clock ([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 ffffffff813ea549
schedule_hrtimeout_range ([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 ffffffff8111cf61
poll_schedule_timeout ([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 ffffffff8111d7eb do_select
([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 ffffffff8111d9a3
core_sys_select ([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 ffffffff8111dad8 sys_select
([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 ffffffff81002cf2
system_call ([kernel.kallsyms])
12:26:41.890762 105188460714 1 sshd 983 7f2e0d15dec3
__GI_select (/lib64/libc-2.12.90.so)
>> +static int perf_session__print_sample(struct perf_session *self,
>
> Please replace self with 'session', Thomas suggested that and I agreed
> that its better. We'll slowly rename all those self variables.
Ok. I noted the mix and wasn't sure which name to use.
>
>> + struct addr_location *al,
>> + struct sample_data *data)
>> +{
>> + static int show_timehist_error = 1;
>> + u64 timestamp = 0;
>> + struct map_symbol *syms = NULL;
>> + struct symbol *parent = NULL;
>> + const char *tstr;
>> +
>> + if (show_timehist_error &&
>> + ((data->cpu == (u32) -1) || !(self->sample_type & PERF_SAMPLE_TIME))) {
>> + pr_err("Data for time history missing in perf event samples.\n"
>> + "Did you record with -T option?\n");
>
> --timehist
>
> As you used:
>
> + OPT_BOOLEAN(0, "timehist", &time_history,
> + "Dump time history of event samples"),
>
> In a branch I'm working on I'm using 'T' to mean "--sample_time", i.e.
> to ask for just PERF_SAMPLE_TIME
Ok. I wanted consistency between record and report and moved from -T to
--timehist. Forgot to update the help message above.
David
next prev parent reply other threads:[~2010-11-30 19:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 23:07 [PATCH 0/2] perf tools: reference timestamp and time history dump David Ahern
2010-11-29 23:07 ` [PATCH 1/2] perf tools: add reference timestamp to perf header David Ahern
2010-11-29 23:07 ` [PATCH 2/2] perf tools: Add option to show time history of event samples David Ahern
2010-11-30 19:19 ` Arnaldo Carvalho de Melo
2010-11-30 19:36 ` David S. Ahern [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-12-08 1:54 [PATCH 0/2] perf tools: add reference timestamp and use it in time history dump David Ahern
2010-12-08 1:54 ` [PATCH 2/2] perf tools: Add option to show time history of event samples David Ahern
2010-12-08 21:06 ` Arnaldo Carvalho de Melo
2010-12-12 21:32 ` Frederic Weisbecker
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=4CF5524C.5090900@cisco.com \
--to=daahern@cisco.com \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).