From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, acme@redhat.com,
dsahern@gmail.com, namhyung.kim@lge.com
Subject: [PATCH 0/5] perf tools: add meta-data header support in pipe mode
Date: Wed, 11 Apr 2012 11:01:24 +0200 [thread overview]
Message-ID: <1334134889-20312-1-git-send-email-eranian@google.com> (raw)
This patch series adds meta-data support to perf record/report in pipe
mode:
perf record -o - foo | perf inject -b | perf report -i -
We had meta-data (information about host configuration, perf tool version,...)
in regular (file) mode but it was lacking in pipe mode. This patch series fixes
this.
In pipe mode, there is no meta-data header structures at the beginning of the
streamed data given we cannot seek in a pipe. Instead, we need to create pseudo
record types for each of the possible features, e.g., hostname, cpuid, event_desc,
and so on. Those pseudo records are guaranteed to be before any actual sample
records, therefore perf report/annotate are guaranteed to get the information
they need before processing the first sample.
The series also fixes perf inject to actually inject build-ids and buildid-list
to work better with pipe mode, i.e., print the build-ids.
With this series:
$ perf record -o - noploop 2 | perf inject -b | perf report -i -
# ========
# captured on: Fri Jan 20 18:13:55 2012
# ========
#
# hostname : quad
# os release : 3.2.0-rc7-tip
# perf version : 3.2.0
# arch : x86_64
# nrcpus online : 4
# nrcpus avail : 4
# cpudesc : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
# cpuid : GenuineIntel,6,15,11
# total memory : 8092884 kB
...
# HEADER_CPU_TOPOLOGY info available, use -I to display
noploop for 2 seconds
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.084 MB - (~3677 samples) ]
99.80% noploop noploop [.] noploop
0.19% noploop [kernel.kallsyms] [k] radix_tree_gang_lookup
Signed-off-by: Stephane Eranian <eranian@google.com>
Stephane Eranian (5):
perf inject: fix broken perf inject -b
perf tools: fix piped mode read code
perf tools: rename HEADER_TRACE_INFO to HEADER_TRACING_DATA
perf record: add meta-data support for pipe-mode
perf: make perf buildid-list work better with pipe mode
tools/perf/builtin-annotate.c | 5 +
tools/perf/builtin-buildid-list.c | 6 +-
tools/perf/builtin-inject.c | 6 +
tools/perf/builtin-record.c | 11 +-
tools/perf/builtin-report.c | 7 +-
tools/perf/util/build-id.c | 2 +
tools/perf/util/event.c | 12 +
tools/perf/util/event.h | 18 ++
tools/perf/util/header.c | 538 ++++++++++++++++++++++++++-----------
tools/perf/util/header.h | 11 +-
tools/perf/util/session.c | 52 +++-
tools/perf/util/tool.h | 4 +-
12 files changed, 494 insertions(+), 178 deletions(-)
--
1.7.4.1
next reply other threads:[~2012-04-11 9:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 9:01 Stephane Eranian [this message]
2012-04-11 9:01 ` [PATCH 1/5] perf inject: fix broken perf inject -b Stephane Eranian
2012-04-11 9:01 ` [PATCH 2/5] perf tools: fix piped mode read code Stephane Eranian
2012-05-11 0:11 ` David Ahern
2012-05-14 20:24 ` Stephane Eranian
2012-04-11 9:01 ` [PATCH 3/5] perf tools: rename HEADER_TRACE_INFO to HEADER_TRACING_DATA Stephane Eranian
2012-04-11 9:01 ` [PATCH 4/5] perf record: add meta-data support for pipe-mode Stephane Eranian
2012-04-11 9:01 ` [PATCH 5/5] perf: make perf buildid-list work better with pipe mode Stephane Eranian
2012-04-26 15:14 ` [PATCH 0/5] perf tools: add meta-data header support in " Stephane Eranian
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=1334134889-20312-1-git-send-email-eranian@google.com \
--to=eranian@google.com \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=namhyung.kim@lge.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox