lkml.org 
[lkml]   [2010]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/11] perf: Handle injection iotcl for tracepoints from perf record
Date
Call the injection iotcl request for tracepoint events, in case
some of them support it.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
---
tools/perf/builtin-record.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index eea5691..da42519 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -386,6 +386,15 @@ try_again:
}

ioctl(fd[nr_cpu][counter], PERF_EVENT_IOC_ENABLE);
+
+ /*
+ * If a tracepoint has some events he wants us to catchup
+ * let's inject them. We may have such injectable event
+ * in several cpus, we want only one injection, so pick the
+ * first cpu
+ */
+ if (attr->type == PERF_TYPE_TRACEPOINT && !nr_cpu)
+ ioctl(fd[nr_cpu][counter], PERF_EVENT_IOC_INJECT);
}

static void open_counters(int cpu, pid_t pid)
--
1.6.2.3


\
 
 \ /
  Last update: 2010-02-03 10:19    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site