]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/builtin-timechart.c
Merge commit 'v2.6.39-rc3' into for-2.6.39
[karo-tx-linux.git] / tools / perf / builtin-timechart.c
index 0ace786e83e06a8734ab1bc78ddd5c717c0b6214..aa26f4d66d1020eb075942dc42fdc874d7dfaddc 100644 (file)
@@ -273,21 +273,24 @@ static int cpus_cstate_state[MAX_CPUS];
 static u64 cpus_pstate_start_times[MAX_CPUS];
 static u64 cpus_pstate_state[MAX_CPUS];
 
-static int process_comm_event(event_t *event, struct sample_data *sample __used,
+static int process_comm_event(union perf_event *event,
+                             struct perf_sample *sample __used,
                              struct perf_session *session __used)
 {
        pid_set_comm(event->comm.tid, event->comm.comm);
        return 0;
 }
 
-static int process_fork_event(event_t *event, struct sample_data *sample __used,
+static int process_fork_event(union perf_event *event,
+                             struct perf_sample *sample __used,
                              struct perf_session *session __used)
 {
        pid_fork(event->fork.pid, event->fork.ppid, event->fork.time);
        return 0;
 }
 
-static int process_exit_event(event_t *event, struct sample_data *sample __used,
+static int process_exit_event(union perf_event *event,
+                             struct perf_sample *sample __used,
                              struct perf_session *session __used)
 {
        pid_exit(event->fork.pid, event->fork.time);
@@ -483,8 +486,9 @@ static void sched_switch(int cpu, u64 timestamp, struct trace_entry *te)
 }
 
 
-static int process_sample_event(event_t *event __used,
-                               struct sample_data *sample,
+static int process_sample_event(union perf_event *event __used,
+                               struct perf_sample *sample,
+                               struct perf_evsel *evsel __used,
                                struct perf_session *session)
 {
        struct trace_entry *te;
@@ -503,6 +507,16 @@ static int process_sample_event(event_t *event __used,
                struct power_entry_old *peo;
                peo = (void *)te;
 #endif
+               /*
+                * FIXME: use evsel, its already mapped from id to perf_evsel,
+                * remove perf_header__find_event infrastructure bits.
+                * Mapping all these "power:cpu_idle" strings to the tracepoint
+                * ID and then just comparing against evsel->attr.config.
+                *
+                * e.g.:
+                *
+                * if (evsel->attr.config == power_cpu_idle_id)
+                */
                event_str = perf_header__find_event(te->type);
 
                if (!event_str)