lkml.org 
[lkml]   [2009]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] perf record: Enable PERF_SAMPLE_ID when sampling multiple events

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;

\
 
 \ /
  Last update: 2009-10-21 08:27    [W:0.194 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site