From: tip-bot for Li Zefan <lizf@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
fweisbec@gmail.com, lizf@cn.fujitsu.com, peterz@infradead.org,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/core] perf trace: Sample timestamp and cpu when using record flag
Date: Thu, 17 Sep 2009 22:35:54 GMT [thread overview]
Message-ID: <tip-1281a49b7aa865a1f0d60e2b28410e6234fc686b@git.kernel.org> (raw)
In-Reply-To: <4AB1F827.8040905@cn.fujitsu.com>
Commit-ID: 1281a49b7aa865a1f0d60e2b28410e6234fc686b
Gitweb: http://git.kernel.org/tip/1281a49b7aa865a1f0d60e2b28410e6234fc686b
Author: Li Zefan <lizf@cn.fujitsu.com>
AuthorDate: Thu, 17 Sep 2009 16:49:43 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 18 Sep 2009 00:30:25 +0200
perf trace: Sample timestamp and cpu when using record flag
Sample timestamp and cpu just like the -R option.
Before:
init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0
init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0
init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=1 handler=i8042
init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0
init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=1 handler=i8042
After:
init-0 [001] 7364.568965353: irq_handler_entry: irq=18 handler=eth0
init-0 [001] 7365.530226877: irq_handler_entry: irq=1 handler=i8042
init-0 [001] 7365.542831563: irq_handler_entry: irq=18 handler=eth0
init-0 [001] 7365.644156299: irq_handler_entry: irq=18 handler=eth0
init-0 [001] 7365.694556201: irq_handler_entry: irq=18 handler=eth0
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <4AB1F827.8040905@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/util/parse-events.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 910283c..a9bdcab 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -425,8 +425,11 @@ parse_single_tracepoint_event(char *sys_name,
int fd;
if (flags) {
- if (!strncmp(flags, "record", strlen(flags)))
+ if (!strncmp(flags, "record", strlen(flags))) {
attr->sample_type |= PERF_SAMPLE_RAW;
+ attr->sample_type |= PERF_SAMPLE_TIME;
+ attr->sample_type |= PERF_SAMPLE_CPU;
+ }
}
snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path,
prev parent reply other threads:[~2009-09-17 22:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 8:49 [PATCH] " Li Zefan
2009-09-17 8:56 ` Frederic Weisbecker
2009-09-17 22:35 ` tip-bot for Li Zefan [this message]
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=tip-1281a49b7aa865a1f0d60e2b28410e6234fc686b@git.kernel.org \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--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
Powered by JetHome