Home
last modified time | relevance | path

Searched refs:session (Results 1 – 25 of 63) sorted by relevance

123

/tools/perf/tests/
Dtopology.c34 struct perf_session *session; in session_write_header() local
40 session = perf_session__new(&data, false, NULL); in session_write_header()
41 TEST_ASSERT_VAL("can't get session", !IS_ERR(session)); in session_write_header()
43 session->evlist = perf_evlist__new_default(); in session_write_header()
44 TEST_ASSERT_VAL("can't get evlist", session->evlist); in session_write_header()
46 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY); in session_write_header()
47 perf_header__set_feat(&session->header, HEADER_NRCPUS); in session_write_header()
48 perf_header__set_feat(&session->header, HEADER_ARCH); in session_write_header()
50 session->header.data_size += DATA_SIZE; in session_write_header()
53 !perf_session__write_header(session, session->evlist, data.file.fd, true)); in session_write_header()
[all …]
/tools/perf/util/
Dsession.h59 void perf_session__delete(struct perf_session *session);
63 int perf_session__peek_event(struct perf_session *session, off_t file_offset,
67 typedef int (*peek_events_cb_t)(struct perf_session *session,
70 int perf_session__peek_events(struct perf_session *session, u64 offset,
73 int perf_session__process_events(struct perf_session *session);
80 int perf_session__resolve_callchain(struct perf_session *session,
86 bool perf_session__has_traces(struct perf_session *session, const char *msg);
90 int perf_session__create_kernel_maps(struct perf_session *session);
92 void perf_session__set_id_hdr_size(struct perf_session *session);
95 struct machine *perf_session__find_machine(struct perf_session *session, pid_t pid) in perf_session__find_machine() argument
[all …]
Dsession.c38 static int perf_session__process_compressed_event(struct perf_session *session, in perf_session__process_compressed_event() argument
44 size_t mmap_len, decomp_len = session->header.env.comp_mmap_len; in perf_session__process_compressed_event()
45 struct decomp *decomp, *decomp_last = session->decomp_last; in perf_session__process_compressed_event()
72 decomp_size = zstd_decompress_stream(&(session->zstd_data), src, src_size, in perf_session__process_compressed_event()
82 if (session->decomp == NULL) { in perf_session__process_compressed_event()
83 session->decomp = decomp; in perf_session__process_compressed_event()
84 session->decomp_last = decomp; in perf_session__process_compressed_event()
86 session->decomp_last->next = decomp; in perf_session__process_compressed_event()
87 session->decomp_last = decomp; in perf_session__process_compressed_event()
98 static int perf_session__deliver_event(struct perf_session *session,
[all …]
Dauxtrace.h182 int (*process_event)(struct perf_session *session,
186 int (*process_auxtrace_event)(struct perf_session *session,
189 int (*queue_data)(struct perf_session *session,
192 void (*dump_auxtrace_sample)(struct perf_session *session,
194 int (*flush_events)(struct perf_session *session,
196 void (*free_events)(struct perf_session *session);
197 void (*free)(struct perf_session *session);
198 bool (*evsel_is_auxtrace)(struct perf_session *session,
367 struct perf_session *session,
508 struct perf_session *session,
[all …]
Darm-spe.c44 struct perf_session *session; member
158 int fd = perf_data__fd(speq->spe->session->data); in arm_spe_get_trace()
268 ret = perf_session__deliver_synth_event(spe->session, event, sample); in arm_spe_deliver_synth_event()
472 struct evlist *evlist = spe->session->evlist; in arm_spe__is_timeless_decoding()
582 static int arm_spe_process_event(struct perf_session *session, in arm_spe_process_event() argument
589 struct arm_spe *spe = container_of(session->auxtrace, in arm_spe_process_event()
628 static int arm_spe_process_auxtrace_event(struct perf_session *session, in arm_spe_process_auxtrace_event() argument
632 struct arm_spe *spe = container_of(session->auxtrace, struct arm_spe, in arm_spe_process_auxtrace_event()
638 int fd = perf_data__fd(session->data); in arm_spe_process_auxtrace_event()
641 if (perf_data__is_pipe(session->data)) { in arm_spe_process_auxtrace_event()
[all …]
Dintel-bts.c49 struct perf_session *session; member
140 err = perf_session__deliver_synth_event(bts->session, &event, NULL); in intel_bts_lost()
310 ret = perf_session__deliver_synth_event(bts->session, &event, &sample); in intel_bts_synth_branch_sample()
354 err = perf_session__deliver_synth_event(bts->session, &event, NULL); in intel_bts_synth_error()
484 int fd = perf_data__fd(btsq->bts->session->data); in intel_bts_process_queue()
591 static int intel_bts_process_event(struct perf_session *session, in intel_bts_process_event() argument
596 struct intel_bts *bts = container_of(session->auxtrace, struct intel_bts, in intel_bts_process_event()
635 static int intel_bts_process_auxtrace_event(struct perf_session *session, in intel_bts_process_auxtrace_event() argument
639 struct intel_bts *bts = container_of(session->auxtrace, struct intel_bts, in intel_bts_process_auxtrace_event()
648 int fd = perf_data__fd(session->data); in intel_bts_process_auxtrace_event()
[all …]
Dauxtrace.c108 static bool auxtrace__dont_decode(struct perf_session *session) in auxtrace__dont_decode() argument
110 return !session->itrace_synth_opts || in auxtrace__dont_decode()
111 session->itrace_synth_opts->dont_decode; in auxtrace__dont_decode()
262 static void *auxtrace_copy_data(u64 size, struct perf_session *session) in auxtrace_copy_data() argument
264 int fd = perf_data__fd(session->data); in auxtrace_copy_data()
349 static bool filter_cpu(struct perf_session *session, int cpu) in filter_cpu() argument
351 unsigned long *cpu_bitmap = session->itrace_synth_opts->cpu_bitmap; in filter_cpu()
357 struct perf_session *session, in auxtrace_queues__add_buffer() argument
364 if (filter_cpu(session, buffer->cpu)) in auxtrace_queues__add_buffer()
371 if (session->one_mmap) { in auxtrace_queues__add_buffer()
[all …]
Ds390-cpumsf.c171 struct perf_session *session; member
538 if (perf_session__deliver_synth_event(sfq->sf->session, &event, in s390_cpumsf_make_event()
730 int fd = perf_data__fd(sfq->sf->session->data); in s390_cpumsf_run_decoder()
896 err = perf_session__deliver_synth_event(sf->session, &event, NULL); in s390_cpumsf_synth_error()
911 s390_cpumsf_process_event(struct perf_session *session, in s390_cpumsf_process_event() argument
916 struct s390_cpumsf *sf = container_of(session->auxtrace, in s390_cpumsf_process_event()
935 ev_bc000 = perf_evlist__event2evsel(session->evlist, event); in s390_cpumsf_process_event()
956 struct perf_session *session; member
960 s390_cpumsf_process_auxtrace_event(struct perf_session *session, in s390_cpumsf_process_auxtrace_event() argument
964 struct s390_cpumsf *sf = container_of(session->auxtrace, in s390_cpumsf_process_auxtrace_event()
[all …]
Dbuild-id.h36 int dsos__hit_all(struct perf_session *session);
42 bool perf_session__read_build_ids(struct perf_session *session, bool with_hits);
43 int perf_session__write_buildid_table(struct perf_session *session,
45 int perf_session__cache_build_ids(struct perf_session *session);
Dheader.h116 int perf_session__read_header(struct perf_session *session);
117 int perf_session__write_header(struct perf_session *session,
136 int perf_event__process_feature(struct perf_session *session,
144 int perf_event__process_tracing_data(struct perf_session *session,
146 int perf_event__process_build_id(struct perf_session *session,
Dtool.h29 typedef int (*event_op2)(struct perf_session *session, union perf_event *event);
30 typedef s64 (*event_op3)(struct perf_session *session, union perf_event *event);
31 typedef int (*event_op4)(struct perf_session *session, union perf_event *event, u64 data);
Dheader.c309 struct perf_session *session; in write_build_id() local
312 session = container_of(ff->ph, struct perf_session, header); in write_build_id()
314 if (!perf_session__read_build_ids(session, true)) in write_build_id()
320 err = perf_session__write_buildid_table(session, ff); in write_build_id()
325 perf_session__cache_build_ids(session); in write_build_id()
878 struct perf_session *session; in write_auxtrace() local
884 session = container_of(ff->ph, struct perf_session, header); in write_auxtrace()
886 err = auxtrace_index__write(ff->fd, &session->auxtrace_index); in write_auxtrace()
936 struct perf_session *session; in write_dir_format() local
939 session = container_of(ff->ph, struct perf_session, header); in write_dir_format()
[all …]
Dintel-pt.c59 struct perf_session *session; member
242 static void intel_pt_dump_sample(struct perf_session *session, in intel_pt_dump_sample() argument
245 struct intel_pt *pt = container_of(session->auxtrace, struct intel_pt, in intel_pt_dump_sample()
295 int fd = perf_data__fd(ptq->pt->session->data); in intel_pt_get_buffer()
776 evlist__for_each_entry(pt->session->evlist, evsel) { in intel_pt_exclude_kernel()
792 evlist__for_each_entry(pt->session->evlist, evsel) { in intel_pt_return_compression()
805 evlist__for_each_entry(pt->session->evlist, evsel) { in intel_pt_branch_enable()
825 evlist__for_each_entry(pt->session->evlist, evsel) { in intel_pt_mtc_period()
841 evlist__for_each_entry(pt->session->evlist, evsel) { in intel_pt_timeless_decoding()
858 evlist__for_each_entry(pt->session->evlist, evsel) { in intel_pt_tracing_kernel()
[all …]
Dcs-etm.c47 struct perf_session *session; member
524 static int cs_etm__flush_events(struct perf_session *session, in cs_etm__flush_events() argument
528 struct cs_etm_auxtrace *etm = container_of(session->auxtrace, in cs_etm__flush_events()
597 static void cs_etm__free_events(struct perf_session *session) in cs_etm__free_events() argument
600 struct cs_etm_auxtrace *aux = container_of(session->auxtrace, in cs_etm__free_events()
613 static void cs_etm__free(struct perf_session *session) in cs_etm__free() argument
617 struct cs_etm_auxtrace *aux = container_of(session->auxtrace, in cs_etm__free()
620 cs_etm__free_events(session); in cs_etm__free()
621 session->auxtrace = NULL; in cs_etm__free()
637 static bool cs_etm__evsel_is_auxtrace(struct perf_session *session, in cs_etm__evsel_is_auxtrace() argument
[all …]
/tools/perf/bench/
Dsynthesize.c61 static int do_run_single_threaded(struct perf_session *session, in do_run_single_threaded() argument
79 err = __machine__synthesize_threads(&session->machines.host, in do_run_single_threaded()
112 struct perf_session *session; in run_single_threaded() local
120 session = perf_session__new(NULL, false, NULL); in run_single_threaded()
121 if (IS_ERR(session)) { in run_single_threaded()
123 return PTR_ERR(session); in run_single_threaded()
136 err = do_run_single_threaded(session, threads, &target, false); in run_single_threaded()
140 err = do_run_single_threaded(session, threads, &target, true); in run_single_threaded()
146 perf_session__delete(session); in run_single_threaded()
159 struct perf_session *session; in do_run_multi_threaded() local
[all …]
/tools/perf/
Dbuiltin-buildid-list.c54 struct perf_session *session; in perf_session__list_build_ids() local
68 session = perf_session__new(&data, false, &build_id__mark_dso_hit_ops); in perf_session__list_build_ids()
69 if (IS_ERR(session)) in perf_session__list_build_ids()
70 return PTR_ERR(session); in perf_session__list_build_ids()
77 perf_header__has_feat(&session->header, HEADER_AUXTRACE)) in perf_session__list_build_ids()
85 perf_session__process_events(session); in perf_session__list_build_ids()
87 perf_session__fprintf_dsos_buildid(session, stdout, dso__skip_buildid, with_hits); in perf_session__list_build_ids()
88 perf_session__delete(session); in perf_session__list_build_ids()
Dbuiltin-evlist.c23 struct perf_session *session; in __cmd_evlist() local
32 session = perf_session__new(&data, 0, NULL); in __cmd_evlist()
33 if (IS_ERR(session)) in __cmd_evlist()
34 return PTR_ERR(session); in __cmd_evlist()
36 evlist__for_each_entry(session->evlist, pos) { in __cmd_evlist()
46 perf_session__delete(session); in __cmd_evlist()
Dbuiltin-report.c72 struct perf_session *session; member
217 static int process_feature_event(struct perf_session *session, in process_feature_event() argument
220 struct report *rep = container_of(session->tool, struct report, tool); in process_feature_event()
223 return perf_event__process_feature(session, event); in process_feature_event()
236 setup_forced_leader(rep, session->evlist); in process_feature_event()
340 struct perf_session *session = rep->session; in report__setup_sample_type() local
341 u64 sample_type = evlist__combined_sample_type(session->evlist); in report__setup_sample_type()
342 bool is_pipe = perf_data__is_pipe(session->data); in report__setup_sample_type()
345 if (session->itrace_synth_opts->callchain || in report__setup_sample_type()
346 session->itrace_synth_opts->add_callchain || in report__setup_sample_type()
[all …]
Dbuiltin-inject.c39 struct perf_session *session; member
101 static int perf_event__repipe_op2_synth(struct perf_session *session, in perf_event__repipe_op2_synth() argument
104 return perf_event__repipe_synth(session->tool, event); in perf_event__repipe_op2_synth()
107 static int perf_event__repipe_op4_synth(struct perf_session *session, in perf_event__repipe_op4_synth() argument
111 return perf_event__repipe_synth(session->tool, event); in perf_event__repipe_op4_synth()
160 static s64 perf_event__repipe_auxtrace(struct perf_session *session, in perf_event__repipe_auxtrace() argument
163 struct perf_tool *tool = session->tool; in perf_event__repipe_auxtrace()
176 ret = auxtrace_index__auxtrace_event(&session->auxtrace_index, in perf_event__repipe_auxtrace()
182 if (perf_data__is_pipe(session->data) || !session->one_mmap) { in perf_event__repipe_auxtrace()
186 ret = copy_bytes(inject, perf_data__fd(session->data), in perf_event__repipe_auxtrace()
[all …]
Dbuiltin-annotate.c47 struct perf_session *session; member
289 static int process_feature_event(struct perf_session *session, in process_feature_event() argument
293 return perf_event__process_feature(session, event); in process_feature_event()
391 struct perf_session *session = ann->session; in __cmd_annotate() local
396 ret = perf_session__cpu_bitmap(session, ann->cpu_list, in __cmd_annotate()
403 ret = perf_env__lookup_objdump(&session->header.env, in __cmd_annotate()
409 ret = perf_session__process_events(session); in __cmd_annotate()
414 perf_session__fprintf_nr_events(session, stdout); in __cmd_annotate()
415 perf_evlist__fprintf_nr_events(session->evlist, stdout); in __cmd_annotate()
420 perf_session__fprintf(session, stdout); in __cmd_annotate()
[all …]
Dbuiltin-record.c95 struct perf_session *session; member
151 struct perf_data_file *file = &rec->session->data->file; in record__write()
175 static size_t zstd_compress(struct perf_session *session, void *dst, size_t dst_size,
310 size = zstd_compress(aio->rec->session, aio->data + aio->size, in record__aio_pushfn()
339 int trace_fd = rec->session->data->file.fd; in record__aio_push()
537 size = zstd_compress(rec->session, map->data, mmap__mmap_len(map), bf, size); in record__pushfn()
611 err = auxtrace_index__auxtrace_event(&rec->session->auxtrace_index, in record__process_auxtrace()
884 struct perf_session *session = rec->session; in record__open() local
961 session->evlist = evlist; in record__open()
962 perf_session__set_id_hdr_size(session); in record__open()
[all …]
Dbuiltin-stat.c178 struct perf_session *session; member
859 err = perf_session__write_header(perf_stat.session, evsel_list, in __run_perf_stat()
1442 return perf_env__get_socket(map, idx, &perf_stat.session->header.env); in perf_stat__get_socket_file()
1447 return perf_env__get_die(map, idx, &perf_stat.session->header.env); in perf_stat__get_die_file()
1453 return perf_env__get_core(map, idx, &perf_stat.session->header.env); in perf_stat__get_core_file()
1459 return perf_env__get_node(map, idx, &perf_stat.session->header.env); in perf_stat__get_node_file()
1464 struct perf_env *env = &st->session->header.env; in perf_stat_init_aggr_mode_file()
1802 static void init_features(struct perf_session *session) in init_features() argument
1807 perf_header__set_feat(&session->header, feat); in init_features()
1809 perf_header__clear_feat(&session->header, HEADER_DIR_FORMAT); in init_features()
[all …]
Dbuiltin-buildid-cache.c294 static int build_id_cache__fprintf_missing(struct perf_session *session, FILE *fp) in build_id_cache__fprintf_missing() argument
296 perf_session__fprintf_dsos_buildid(session, fp, dso__missing_buildid_cache, 0); in build_id_cache__fprintf_missing()
372 struct perf_session *session = NULL; in cmd_buildid_cache() local
424 session = perf_session__new(&data, false, NULL); in cmd_buildid_cache()
425 if (IS_ERR(session)) in cmd_buildid_cache()
426 return PTR_ERR(session); in cmd_buildid_cache()
429 if (symbol__init(session ? &session->header.env : NULL) < 0) in cmd_buildid_cache()
501 ret = build_id_cache__fprintf_missing(session, stdout); in cmd_buildid_cache()
525 perf_session__delete(session); in cmd_buildid_cache()
Dbuiltin-script.c122 struct perf_session *session; member
417 static int evsel__check_attr(struct evsel *evsel, struct perf_session *session) in evsel__check_attr() argument
422 if (perf_header__has_feat(&session->header, HEADER_STAT)) in evsel__check_attr()
425 allow_user_set = perf_header__has_feat(&session->header, in evsel__check_attr()
429 !perf_session__has_traces(session, "record -R")) in evsel__check_attr()
472 !(evlist__combined_branch_type(session->evlist) & PERF_SAMPLE_BRANCH_ANY)) { in evsel__check_attr()
529 static int perf_session__check_output_opt(struct perf_session *session) in perf_session__check_output_opt() argument
536 evsel = perf_session__find_first_evtype(session, attr_type(j)); in perf_session__check_output_opt()
551 evsel__check_attr(evsel, session)) in perf_session__check_output_opt()
565 evlist__for_each_entry(session->evlist, evsel) { in perf_session__check_output_opt()
[all …]
/tools/perf/ui/browsers/
Dheader.c99 struct perf_session *session; in tui__header_window() local
104 session = container_of(env, struct perf_session, header.env); in tui__header_window()
105 perf_header__fprintf_info(session, fp, true); in tui__header_window()

123