aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-timechart.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-timechart.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-timechart.c')
-rw-r--r--tools/perf/builtin-timechart.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 759dd2b35fdb..db6caae1a404 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -281,21 +281,19 @@ static int cpus_cstate_state[MAX_CPUS];
281static u64 cpus_pstate_start_times[MAX_CPUS]; 281static u64 cpus_pstate_start_times[MAX_CPUS];
282static u64 cpus_pstate_state[MAX_CPUS]; 282static u64 cpus_pstate_state[MAX_CPUS];
283 283
284static int 284static int process_comm_event(event_t *event, struct perf_session *session __used)
285process_comm_event(event_t *event)
286{ 285{
287 pid_set_comm(event->comm.pid, event->comm.comm); 286 pid_set_comm(event->comm.pid, event->comm.comm);
288 return 0; 287 return 0;
289} 288}
290static int 289
291process_fork_event(event_t *event) 290static int process_fork_event(event_t *event, struct perf_session *session __used)
292{ 291{
293 pid_fork(event->fork.pid, event->fork.ppid, event->fork.time); 292 pid_fork(event->fork.pid, event->fork.ppid, event->fork.time);
294 return 0; 293 return 0;
295} 294}
296 295
297static int 296static int process_exit_event(event_t *event, struct perf_session *session __used)
298process_exit_event(event_t *event)
299{ 297{
300 pid_exit(event->fork.pid, event->fork.time); 298 pid_exit(event->fork.pid, event->fork.time);
301 return 0; 299 return 0;
@@ -594,8 +592,7 @@ static u64 sample_time(event_t *event)
594 * We first queue all events, sorted backwards by insertion. 592 * We first queue all events, sorted backwards by insertion.
595 * The order will get flipped later. 593 * The order will get flipped later.
596 */ 594 */
597static int 595static int queue_sample_event(event_t *event, struct perf_session *session __used)
598queue_sample_event(event_t *event)
599{ 596{
600 struct sample_wrapper *copy, *prev; 597 struct sample_wrapper *copy, *prev;
601 int size; 598 int size;