From: Anton Blanchard <anton@samba.org>
To: mingo@elte.hu, paulus@samba.org, a.p.zijlstra@chello.nl
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] perf record: Enable PERF_SAMPLE_ID when sampling multiple events
Date: Wed, 21 Oct 2009 17:19:25 +1100 [thread overview]
Message-ID: <20091021061925.GW4808@kryten> (raw)
If we are sampling multiple events we need the id in each sample so we can
differentiate between them in a perf data file.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux.trees.git/tools/perf/builtin-record.c
===================================================================
--- linux.trees.git.orig/tools/perf/builtin-record.c 2009-10-21 14:58:33.000000000 +1100
+++ linux.trees.git/tools/perf/builtin-record.c 2009-10-21 17:12:33.000000000 +1100
@@ -413,6 +413,9 @@ static void create_counter(int counter,
attr->sample_type |= PERF_SAMPLE_CPU;
}
+ if (nr_counters > 1)
+ attr->sample_type |= PERF_SAMPLE_ID;
+
attr->mmap = track;
attr->comm = track;
attr->inherit = (cpu < 0) && inherit;
next reply other threads:[~2009-10-21 6:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 6:19 Anton Blanchard [this message]
2009-10-21 11:59 ` [PATCH] perf record: Enable PERF_SAMPLE_ID when sampling multiple events Ingo Molnar
2009-10-22 5:00 ` Anton Blanchard
2009-10-23 6:18 ` Ingo Molnar
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=20091021061925.GW4808@kryten \
--to=anton@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.