From: Frederic Weisbecker <fweisbec@gmail.com>
To: David Ahern <daahern@cisco.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
acme@ghostprotocols.net, mingo@elte.hu, peterz@infradead.org,
paulus@samba.org, tglx@linutronix.de
Subject: Re: [PATCH 0/4] perf events: Add realtime clock event and timehist option -v2
Date: Mon, 21 Feb 2011 22:37:42 +0100 [thread overview]
Message-ID: <20110221213740.GC3583@nowhere> (raw)
In-Reply-To: <1298322150-15505-1-git-send-email-daahern@cisco.com>
On Mon, Feb 21, 2011 at 02:02:26PM -0700, David Ahern wrote:
> v1 -> v2:
> - removed change to WARN_ON_ONCE in perf_event.c
> - fixed init of realtime_clock event (needed call to perf_swevent_init_hrtimer)
> - changed userspace event name to clock-realtime with the alias clkr as the
> raw events code sucks up all options that start with 'r' followed by a hex
> character
> - remove RAW sample hack for pushing realtime clock event data to userspace
> - plumbed PERF_SAMPLE_READ to enable retrieving event data during sample
> generation
> - add patch to perf-stat to recognize realtime-clock as a nsec counter
> - implementation of tiemhist in perf-record was revamped significantly
> -- to use event data,
> -- to better handle fallback to synthesized event,
> -- added feature to force a sample to be generated at startup (to output
> wall-clock times we need a sample immediately; after that realtime-clock
> samples are generated periodically)
> -- change counter creation to be done only on first cpu; we do not need a
> counter for each cpu
>
> A request was made to modify perf-trace and perf-script. From what I can see
> perf-trace does not exist yet and perf-script requires raw data which means
> it does not work for the primary use case that motivated this feature
> (perf record -e cs -1 -ag).
The goal is actually to extend perf script to handle more than just raw data.
So that it can handle the rest of what we can find in an event: time, ip, stacktraces...
You've added 200 lines in perf report to add the dump support. It wouldn't
require more to extend perf script to do that. And the result is going to be
much more powerful.
Look at struct scripting_ops::process_event().
What you need is too pass in the whole event instead of only the raw data,
cpu and so on...
You don't even need to add the support in the scripts themselves, they can
just cope with the new parameter layout. You only need to handle the rest of
the event in the print_event() function (the default scripting_ops::process_event())
to print ip, time and stacktraces.
This probably needs some option in perf script to avoid showing ip and other
new things. Although we probably want to print stacktraces by default
if there are present.
next prev parent reply other threads:[~2011-02-21 21:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 21:02 [PATCH 0/4] perf events: Add realtime clock event and timehist option -v2 David Ahern
2011-02-21 21:02 ` [PATCH 1/4] perf events: Introduce realtime clock event David Ahern
2011-02-21 21:02 ` [PATCH 2/4] perf events: plumbing for PERF_SAMPLE_READ and read_format David Ahern
2011-02-21 21:02 ` [PATCH 3/4] perf events: add timehist option to record and report David Ahern
2011-02-21 21:02 ` [PATCH 4/4] perf stat: treat realtime-clock as nsec counter David Ahern
2011-02-21 21:37 ` Frederic Weisbecker [this message]
2011-02-21 21:41 ` [PATCH 0/4] perf events: Add realtime clock event and timehist option -v2 David Ahern
2011-02-21 21:55 ` Frederic Weisbecker
2011-02-21 22:09 ` David Ahern
2011-02-21 22:21 ` Frederic Weisbecker
2011-02-22 1:16 ` David Ahern
2011-02-22 2:50 ` Frederic Weisbecker
2011-02-22 7:41 ` Ingo Molnar
2011-02-22 8:07 ` 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=20110221213740.GC3583@nowhere \
--to=fweisbec@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=daahern@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--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).