aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-12-13 16:50:24 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-14 10:57:13 -0500
commitd8f66248d6f25f7c935cc5307c43bf394db07272 (patch)
treef30b5512dd08e6a8713fa9fde158c75d57ce1d6b /tools/perf/builtin-record.c
parent2cd9046cc53dd2625e2cf5854d6cbb1ba61de914 (diff)
perf session: Pass the perf_session to the event handling operations
They will need it to get the right threads list, etc. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1260741029-4430-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4decbd14eae..b7e15a1b1ec 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -123,7 +123,8 @@ static void write_event(event_t *buf, size_t size)
123 write_output(buf, size); 123 write_output(buf, size);
124} 124}
125 125
126static int process_synthesized_event(event_t *event) 126static int process_synthesized_event(event_t *event,
127 struct perf_session *self __used)
127{ 128{
128 write_event(event, event->header.size); 129 write_event(event, event->header.size);
129 return 0; 130 return 0;
@@ -488,9 +489,10 @@ static int __cmd_record(int argc, const char **argv)
488 } 489 }
489 490
490 if (!system_wide) 491 if (!system_wide)
491 event__synthesize_thread(pid, process_synthesized_event); 492 event__synthesize_thread(pid, process_synthesized_event,
493 session);
492 else 494 else
493 event__synthesize_threads(process_synthesized_event); 495 event__synthesize_threads(process_synthesized_event, session);
494 496
495 if (target_pid == -1 && argc) { 497 if (target_pid == -1 && argc) {
496 pid = fork(); 498 pid = fork();
@@ -510,7 +512,8 @@ static int __cmd_record(int argc, const char **argv)
510 */ 512 */
511 usleep(1000); 513 usleep(1000);
512 event__synthesize_thread(pid, 514 event__synthesize_thread(pid,
513 process_synthesized_event); 515 process_synthesized_event,
516 session);
514 } 517 }
515 518
516 child_pid = pid; 519 child_pid = pid;