From: Tom Zanussi <tzanussi@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, fweisbec@gmail.com, rostedt@goodmis.org
Subject: [PATCH 0/6] perf trace/scripting updates
Date: Tue, 15 Dec 2009 02:53:34 -0600 [thread overview]
Message-ID: <1260867220-15699-1-git-send-email-tzanussi@gmail.com> (raw)
This patchset fixes a few oversights and adds some options to aid
usability.
With these patches, the list of available trace scripts can be easily
displayed, and the script names shown in the list can be used to
record and invoke the individual scripts without forcing the user to
remember and enter long command-lines.
For example, getting r/w activity for a program e.g. firefox is as
easy as running 'perf trace -l', noting that the rw-by-file script
exists, and using that name to record data and display the results
using 'perf trace record rw-by-file' and 'perf trace report rw-by-file
firefox':
root@tropicana:~# perf trace -l
List of available trace scripts:
workqueue-stats workqueue stats (ins/exe/create/destroy)
wakeup-latency system-wide min/max/avg wakeup latency
rw-by-file <comm> r/w activity for a program, by file
check-perf-trace useless but exhaustive test script
rw-by-pid system-wide r/w activity
root@tropicana:~# perf trace record rw-by-file
^C[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 65.388 MB perf.data (~2856833 samples) ]
root@tropicana:~# perf trace report rw-by-file firefox
perf trace started with Perl script /root/libexec/perf-core/scripts/perl/rw-by-file.pl
file read counts for firefox:
fd # reads bytes_requested
------ ---------- -----------
3 3796 15548416
45 12 33075
32 28 28672
16 20 20480
58 6 17279
22 4 16384
46 2 11289
57 2 8192
26 2 8192
60 2 8192
47 5 4160
12 78 3874
44 2 606
19 179 179
42 8 128
53 1 16
file write counts for firefox:
fd # writes bytes_written
------ ---------- -----------
52 51 55528
26 13 53248
55 22 45100
45 8 23632
42 19 19456
59 28 10304
58 24 8760
61 1 7988
57 13 4640
20 179 179
33 28 28
17 26 26
Note that the perf trace -l option was previously used to display
latency information; this patchset changes that option to -L in the
interest of maintaining consistency with other perf -l options.
The other patches in this patchset fix some oversights, including
adding support for script args, which entails a change to
scripting_ops.
Tom Zanussi (6):
perf trace/scripting: add support for script args
perf trace/scripting: don't install unneeded files
perf trace/scripting: check return val of perl_run()
perf trace/scripting: list available scripts
perf trace/scripting: add 'record' and 'report' options
perf trace/scripting: update Documentation
tools/perf/Documentation/perf-trace.txt | 27 ++-
tools/perf/Makefile | 2 -
tools/perf/builtin-trace.c | 302 +++++++++++++++++++-
.../perf/scripts/perl/bin/check-perf-trace-report | 1 +
tools/perf/scripts/perl/bin/rw-by-file-report | 4 +-
tools/perf/scripts/perl/bin/rw-by-pid-report | 1 +
tools/perf/scripts/perl/bin/wakeup-latency-report | 1 +
tools/perf/scripts/perl/bin/workqueue-stats-report | 1 +
tools/perf/scripts/perl/rw-by-file.pl | 5 +-
tools/perf/util/trace-event-perl.c | 42 ++-
tools/perf/util/trace-event.h | 2 +-
11 files changed, 356 insertions(+), 32 deletions(-)
next reply other threads:[~2009-12-15 8:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 8:53 Tom Zanussi [this message]
2009-12-15 8:53 ` [PATCH 1/6] perf trace/scripting: add support for script args Tom Zanussi
2009-12-15 9:39 ` [tip:perf/urgent] perf trace/scripting: Add " tip-bot for Tom Zanussi
2009-12-15 8:53 ` [PATCH 2/6] perf trace/scripting: don't install unneeded files Tom Zanussi
2009-12-15 9:39 ` [tip:perf/urgent] perf trace/scripting: Don't " tip-bot for Tom Zanussi
2009-12-15 8:53 ` [PATCH 3/6] perf trace/scripting: check return val of perl_run() Tom Zanussi
2009-12-15 9:40 ` [tip:perf/urgent] perf trace/scripting: Check " tip-bot for Tom Zanussi
2009-12-15 8:53 ` [PATCH 4/6] perf trace/scripting: list available scripts Tom Zanussi
2009-12-15 9:40 ` [tip:perf/urgent] perf trace/scripting: List " tip-bot for Tom Zanussi
2009-12-15 8:53 ` [PATCH 5/6] perf trace/scripting: add 'record' and 'report' options Tom Zanussi
2009-12-15 9:40 ` [tip:perf/urgent] perf trace/scripting: Add " tip-bot for Tom Zanussi
2009-12-15 8:53 ` [PATCH 6/6] perf trace/scripting: update Documentation Tom Zanussi
2009-12-15 9:40 ` [tip:perf/urgent] perf trace/scripting: Update Documentation tip-bot for Tom Zanussi
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=1260867220-15699-1-git-send-email-tzanussi@gmail.com \
--to=tzanussi@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome