public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Eric B Munson <ebmunson@us.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, acme@redhat.com,
	hpa@zytor.com, mingo@redhat.com, a.p.zijlstra@chello.nl,
	ebmunson@us.ibm.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf record: Add ID and to recorded event data when recording multiple events
Date: Wed, 10 Mar 2010 13:14:18 GMT	[thread overview]
Message-ID: <tip-8907fd607b66e36636469a2de9833db643869db8@git.kernel.org> (raw)
In-Reply-To: <1267804269-22660-2-git-send-email-acme@infradead.org>

Commit-ID:  8907fd607b66e36636469a2de9833db643869db8
Gitweb:     http://git.kernel.org/tip/8907fd607b66e36636469a2de9833db643869db8
Author:     Eric B Munson <ebmunson@us.ibm.com>
AuthorDate: Fri, 5 Mar 2010 12:51:05 -0300
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 10 Mar 2010 13:53:46 +0100

perf record: Add ID and to recorded event data when recording multiple events

Currently perf record does not write the ID or the to disk for
events. This doesn't allow report to tell if an event stream
contains one or more types of events.  This patch adds this
entry to the list of data that record will write to disk if more
than one event was requested.

Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1267804269-22660-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 tools/perf/builtin-record.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 771533c..f573bbb 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -244,6 +244,9 @@ static void create_counter(int counter, int cpu, pid_t pid)
 
 	attr->sample_type	|= PERF_SAMPLE_IP | PERF_SAMPLE_TID;
 
+	if (nr_counters > 1)
+		attr->sample_type |= PERF_SAMPLE_ID;
+
 	if (freq) {
 		attr->sample_type	|= PERF_SAMPLE_PERIOD;
 		attr->freq		= 1;

  reply	other threads:[~2010-03-10 13:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 15:51 [PATCH 1/6] perf probe: Add missing variable initialization Arnaldo Carvalho de Melo
2010-03-05 15:51 ` [PATCH 2/6] perf record: Add ID and to recorded event data when recording multiple events Arnaldo Carvalho de Melo
2010-03-10 13:14   ` tip-bot for Eric B Munson [this message]
2010-03-05 15:51 ` [PATCH 3/6] perf session: Change add_hist_entry to take the tree root instead of session Arnaldo Carvalho de Melo
2010-03-10 13:14   ` [tip:perf/urgent] " tip-bot for Eric B Munson
2010-03-05 15:51 ` [PATCH 4/6] perf session: Add storage for seperating event types in report Arnaldo Carvalho de Melo
2010-03-10 13:14   ` [tip:perf/urgent] " tip-bot for Eric B Munson
2010-03-05 15:51 ` [PATCH 5/6] perf session: Change perf_session post processing functions to take histogram tree Arnaldo Carvalho de Melo
2010-03-10 13:15   ` [tip:perf/urgent] " tip-bot for Eric B Munson
2010-03-05 15:51 ` [PATCH 6/6] perf report: Add multiple event support Arnaldo Carvalho de Melo
2010-03-10 13:15   ` [tip:perf/urgent] " tip-bot for Eric B Munson
2010-03-05 16:01 ` [PATCH 1/6] perf probe: Add missing variable initialization Masami Hiramatsu

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-8907fd607b66e36636469a2de9833db643869db8@git.kernel.org \
    --to=ebmunson@us.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.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=paulus@samba.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