X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=tools%2Fperf%2Fbuiltin-timechart.c;h=aa26f4d66d1020eb075942dc42fdc874d7dfaddc;hb=fac56c2df51bc29b07b3c2dcfabf32a015a0522c;hp=0ace786e83e06a8734ab1bc78ddd5c717c0b6214;hpb=2935b544041bbdc32a6864ba9350a7629c56d722;p=karo-tx-linux.git diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 0ace786e83e0..aa26f4d66d10 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -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)