Lines Matching full:event
15 #include "event.h"
33 #include "bpf-event.h"
124 struct perf_record_stat_config *event) in perf_event__read_stat_config() argument
128 for (i = 0; i < event->nr; i++) { in perf_event__read_stat_config()
130 switch (event->data[i].tag) { in perf_event__read_stat_config()
133 config->__val = event->data[i].val; \ in perf_event__read_stat_config()
142 event->data[i].tag); in perf_event__read_stat_config()
147 size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp) in perf_event__fprintf_comm() argument
151 if (event->header.misc & PERF_RECORD_MISC_COMM_EXEC) in perf_event__fprintf_comm()
156 return fprintf(fp, "%s: %s:%d/%d\n", s, event->comm.comm, event->comm.pid, event->comm.tid); in perf_event__fprintf_comm()
159 size_t perf_event__fprintf_namespaces(union perf_event *event, FILE *fp) in perf_event__fprintf_namespaces() argument
165 ns_link_info = event->namespaces.link_info; in perf_event__fprintf_namespaces()
166 nr_namespaces = event->namespaces.nr_namespaces; in perf_event__fprintf_namespaces()
169 event->namespaces.pid, in perf_event__fprintf_namespaces()
170 event->namespaces.tid, in perf_event__fprintf_namespaces()
186 size_t perf_event__fprintf_cgroup(union perf_event *event, FILE *fp) in perf_event__fprintf_cgroup() argument
189 event->cgroup.id, event->cgroup.path); in perf_event__fprintf_cgroup()
193 union perf_event *event, in perf_event__process_comm() argument
197 return machine__process_comm_event(machine, event, sample); in perf_event__process_comm()
201 union perf_event *event, in perf_event__process_namespaces() argument
205 return machine__process_namespaces_event(machine, event, sample); in perf_event__process_namespaces()
209 union perf_event *event, in perf_event__process_cgroup() argument
213 return machine__process_cgroup_event(machine, event, sample); in perf_event__process_cgroup()
217 union perf_event *event, in perf_event__process_lost() argument
221 return machine__process_lost_event(machine, event, sample); in perf_event__process_lost()
225 union perf_event *event, in perf_event__process_aux() argument
229 return machine__process_aux_event(machine, event); in perf_event__process_aux()
233 union perf_event *event, in perf_event__process_itrace_start() argument
237 return machine__process_itrace_start_event(machine, event); in perf_event__process_itrace_start()
241 union perf_event *event, in perf_event__process_lost_samples() argument
245 return machine__process_lost_samples_event(machine, event, sample); in perf_event__process_lost_samples()
249 union perf_event *event, in perf_event__process_switch() argument
253 return machine__process_switch_event(machine, event); in perf_event__process_switch()
257 union perf_event *event, in perf_event__process_ksymbol() argument
261 return machine__process_ksymbol(machine, event, sample); in perf_event__process_ksymbol()
265 union perf_event *event, in perf_event__process_bpf() argument
269 return machine__process_bpf(machine, event, sample); in perf_event__process_bpf()
273 union perf_event *event, in perf_event__process_text_poke() argument
277 return machine__process_text_poke(machine, event, sample); in perf_event__process_text_poke()
280 size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp) in perf_event__fprintf_mmap() argument
283 event->mmap.pid, event->mmap.tid, event->mmap.start, in perf_event__fprintf_mmap()
284 event->mmap.len, event->mmap.pgoff, in perf_event__fprintf_mmap()
285 (event->header.misc & PERF_RECORD_MISC_MMAP_DATA) ? 'r' : 'x', in perf_event__fprintf_mmap()
286 event->mmap.filename); in perf_event__fprintf_mmap()
289 size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp) in perf_event__fprintf_mmap2() argument
293 event->mmap2.pid, event->mmap2.tid, event->mmap2.start, in perf_event__fprintf_mmap2()
294 event->mmap2.len, event->mmap2.pgoff, event->mmap2.maj, in perf_event__fprintf_mmap2()
295 event->mmap2.min, event->mmap2.ino, in perf_event__fprintf_mmap2()
296 event->mmap2.ino_generation, in perf_event__fprintf_mmap2()
297 (event->mmap2.prot & PROT_READ) ? 'r' : '-', in perf_event__fprintf_mmap2()
298 (event->mmap2.prot & PROT_WRITE) ? 'w' : '-', in perf_event__fprintf_mmap2()
299 (event->mmap2.prot & PROT_EXEC) ? 'x' : '-', in perf_event__fprintf_mmap2()
300 (event->mmap2.flags & MAP_SHARED) ? 's' : 'p', in perf_event__fprintf_mmap2()
301 event->mmap2.filename); in perf_event__fprintf_mmap2()
304 size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp) in perf_event__fprintf_thread_map() argument
306 struct perf_thread_map *threads = thread_map__new_event(&event->thread_map); in perf_event__fprintf_thread_map()
314 ret += fprintf(fp, "failed to get threads from event\n"); in perf_event__fprintf_thread_map()
320 size_t perf_event__fprintf_cpu_map(union perf_event *event, FILE *fp) in perf_event__fprintf_cpu_map() argument
322 struct perf_cpu_map *cpus = cpu_map__new_data(&event->cpu_map.data); in perf_event__fprintf_cpu_map()
330 ret += fprintf(fp, "failed to get cpumap from event\n"); in perf_event__fprintf_cpu_map()
337 union perf_event *event, in perf_event__process_mmap() argument
341 return machine__process_mmap_event(machine, event, sample); in perf_event__process_mmap()
345 union perf_event *event, in perf_event__process_mmap2() argument
349 return machine__process_mmap2_event(machine, event, sample); in perf_event__process_mmap2()
352 size_t perf_event__fprintf_task(union perf_event *event, FILE *fp) in perf_event__fprintf_task() argument
355 event->fork.pid, event->fork.tid, in perf_event__fprintf_task()
356 event->fork.ppid, event->fork.ptid); in perf_event__fprintf_task()
360 union perf_event *event, in perf_event__process_fork() argument
364 return machine__process_fork_event(machine, event, sample); in perf_event__process_fork()
368 union perf_event *event, in perf_event__process_exit() argument
372 return machine__process_exit_event(machine, event, sample); in perf_event__process_exit()
375 size_t perf_event__fprintf_aux(union perf_event *event, FILE *fp) in perf_event__fprintf_aux() argument
378 event->aux.aux_offset, event->aux.aux_size, in perf_event__fprintf_aux()
379 event->aux.flags, in perf_event__fprintf_aux()
380 event->aux.flags & PERF_AUX_FLAG_TRUNCATED ? "T" : "", in perf_event__fprintf_aux()
381 event->aux.flags & PERF_AUX_FLAG_OVERWRITE ? "O" : "", in perf_event__fprintf_aux()
382 event->aux.flags & PERF_AUX_FLAG_PARTIAL ? "P" : ""); in perf_event__fprintf_aux()
385 size_t perf_event__fprintf_itrace_start(union perf_event *event, FILE *fp) in perf_event__fprintf_itrace_start() argument
388 event->itrace_start.pid, event->itrace_start.tid); in perf_event__fprintf_itrace_start()
391 size_t perf_event__fprintf_switch(union perf_event *event, FILE *fp) in perf_event__fprintf_switch() argument
393 bool out = event->header.misc & PERF_RECORD_MISC_SWITCH_OUT; in perf_event__fprintf_switch()
395 !(event->header.misc & PERF_RECORD_MISC_SWITCH_OUT_PREEMPT) ? in perf_event__fprintf_switch()
398 if (event->header.type == PERF_RECORD_SWITCH) in perf_event__fprintf_switch()
403 event->context_switch.next_prev_pid, in perf_event__fprintf_switch()
404 event->context_switch.next_prev_tid); in perf_event__fprintf_switch()
407 static size_t perf_event__fprintf_lost(union perf_event *event, FILE *fp) in perf_event__fprintf_lost() argument
409 return fprintf(fp, " lost %" PRI_lu64 "\n", event->lost.lost); in perf_event__fprintf_lost()
412 size_t perf_event__fprintf_ksymbol(union perf_event *event, FILE *fp) in perf_event__fprintf_ksymbol() argument
415 event->ksymbol.addr, event->ksymbol.len, in perf_event__fprintf_ksymbol()
416 event->ksymbol.ksym_type, in perf_event__fprintf_ksymbol()
417 event->ksymbol.flags, event->ksymbol.name); in perf_event__fprintf_ksymbol()
420 size_t perf_event__fprintf_bpf(union perf_event *event, FILE *fp) in perf_event__fprintf_bpf() argument
423 event->bpf.type, event->bpf.flags, event->bpf.id); in perf_event__fprintf_bpf()
443 size_t perf_event__fprintf_text_poke(union perf_event *event, struct machine *machine, FILE *fp) in perf_event__fprintf_text_poke() argument
445 struct perf_record_text_poke_event *tp = &event->text_poke; in perf_event__fprintf_text_poke()
471 size_t perf_event__fprintf(union perf_event *event, struct machine *machine, FILE *fp) in perf_event__fprintf() argument
474 perf_event__name(event->header.type)); in perf_event__fprintf()
476 switch (event->header.type) { in perf_event__fprintf()
478 ret += perf_event__fprintf_comm(event, fp); in perf_event__fprintf()
482 ret += perf_event__fprintf_task(event, fp); in perf_event__fprintf()
485 ret += perf_event__fprintf_mmap(event, fp); in perf_event__fprintf()
488 ret += perf_event__fprintf_namespaces(event, fp); in perf_event__fprintf()
491 ret += perf_event__fprintf_cgroup(event, fp); in perf_event__fprintf()
494 ret += perf_event__fprintf_mmap2(event, fp); in perf_event__fprintf()
497 ret += perf_event__fprintf_aux(event, fp); in perf_event__fprintf()
500 ret += perf_event__fprintf_itrace_start(event, fp); in perf_event__fprintf()
504 ret += perf_event__fprintf_switch(event, fp); in perf_event__fprintf()
507 ret += perf_event__fprintf_lost(event, fp); in perf_event__fprintf()
510 ret += perf_event__fprintf_ksymbol(event, fp); in perf_event__fprintf()
513 ret += perf_event__fprintf_bpf(event, fp); in perf_event__fprintf()
516 ret += perf_event__fprintf_text_poke(event, machine, fp); in perf_event__fprintf()
526 union perf_event *event, in perf_event__process() argument
530 return machine__process_event(machine, event, sample); in perf_event__process()