Home
last modified time | relevance | path

Searched refs:sample (Results 1 – 25 of 215) sorted by relevance

123456789

/tools/perf/util/
A Dsample.c11 memset(sample, 0, sizeof(*sample)); in perf_sample__init()
13 sample->user_regs = NULL; in perf_sample__init()
14 sample->intr_regs = NULL; in perf_sample__init()
20 free(sample->user_regs); in perf_sample__exit()
21 free(sample->intr_regs); in perf_sample__exit()
26 if (!sample->user_regs) { in perf_sample__user_regs()
27 sample->user_regs = zalloc(sizeof(*sample->user_regs)); in perf_sample__user_regs()
28 if (!sample->user_regs) in perf_sample__user_regs()
31 return sample->user_regs; in perf_sample__user_regs()
38 sample->intr_regs = zalloc(sizeof(*sample->intr_regs)); in perf_sample__intr_regs()
[all …]
A Dbpf-filter.l17 perf_bpf_filter_lval.sample.term = term; in sample()
18 perf_bpf_filter_lval.sample.part = 0; in sample()
25 perf_bpf_filter_lval.sample.term = term; in sample_part()
26 perf_bpf_filter_lval.sample.part = part; in sample_part()
34 perf_bpf_filter_lval.sample.part = 0; in sample_path()
88 ip { return sample(PBF_TERM_IP); }
89 id { return sample(PBF_TERM_ID); }
90 tid { return sample(PBF_TERM_TID); }
92 cpu { return sample(PBF_TERM_CPU); }
116 uid { return sample(PBF_TERM_UID); }
[all …]
A Dintel-pt.c297 intel_pt_dump(pt, sample->aux_sample.data, sample->aux_sample.size); in intel_pt_dump_sample()
1724 sample->cpumode = intel_pt_cpumode(ptq, sample->ip, sample->addr); in intel_pt_prep_b_sample()
1728 event->sample.header.misc = sample->cpumode; in intel_pt_prep_b_sample()
1940 if (!sample->ip) in intel_pt_prep_p_sample()
2433 sample.id = id; in intel_pt_do_synth_pebs_sample()
3341 sample->pid, sample->tid, 0, sample->time, in intel_pt_lost()
3342 sample->machine_pid, sample->vcpu); in intel_pt_lost()
3433 cpu, tid, sample->time, perf_time_to_tsc(sample->time, in intel_pt_process_switch()
3506 return machine__set_current_tid(machine, sample->vcpu, sample->pid, sample->tid); in intel_pt_guest_context_switch()
3717 if (sample->time && sample->time != (u64)-1) in intel_pt_process_event()
[all …]
A Darm64-frame-pointer-unwind-support.c18 static bool get_leaf_frame_caller_enabled(struct perf_sample *sample) in get_leaf_frame_caller_enabled() argument
25 regs = perf_sample__user_regs(sample); in get_leaf_frame_caller_enabled()
37 u64 get_leaf_frame_caller_aarch64(struct perf_sample *sample, struct thread *thread, int usr_idx) in get_leaf_frame_caller_aarch64() argument
43 if (!get_leaf_frame_caller_enabled(sample)) in get_leaf_frame_caller_aarch64()
51 regs = perf_sample__user_regs(sample); in get_leaf_frame_caller_aarch64()
55 regs->cache_regs[PERF_REG_ARM64_PC] = sample->callchain->ips[usr_idx+1]; in get_leaf_frame_caller_aarch64()
63 ret = unwind__get_entries(add_entry, &entries, thread, sample, 2, true); in get_leaf_frame_caller_aarch64()
A Ddlfilter.h32 struct perf_sample *sample; member
45 const struct perf_dlfilter_sample *sample,
48 const struct perf_dlfilter_sample *sample,
60 struct perf_sample *sample,
71 struct perf_sample *sample, in dlfilter__filter_event() argument
79 return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, false); in dlfilter__filter_event()
84 struct perf_sample *sample, in dlfilter__filter_event_early() argument
92 return dlfilter__do_filter_event(d, event, sample, evsel, machine, al, addr_al, true); in dlfilter__filter_event_early()
A Ds390-sample-raw.c49 size_t len = sample->raw_size, offset = 0; in s390_cpumcfdg_testctr()
50 unsigned char *buf = sample->raw_data; in s390_cpumcfdg_testctr()
183 unsigned char *buf = sample->raw_data; in s390_cpumcfdg_dump()
235 size_t len = sample->raw_size; in s390_pai_all_test()
245 unsigned char *p = sample->raw_data; in s390_pai_all_dump()
287 struct perf_sample *sample) in evlist__s390_sample_raw() argument
300 if (!sample->raw_size || !sample->raw_data) in evlist__s390_sample_raw()
307 if (!s390_cpumcfdg_testctr(sample)) in evlist__s390_sample_raw()
310 s390_cpumcfdg_dump(evsel->pmu, sample); in evlist__s390_sample_raw()
325 if (!s390_pai_all_test(sample)) { in evlist__s390_sample_raw()
[all …]
/tools/testing/selftests/bpf/progs/
A Dtest_ringbuf_map_key.c10 struct sample { struct
24 __type(key, struct sample); argument
38 struct sample *sample, sample_copy; in test_ringbuf_mem_map_key() local
44 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf_mem_map_key()
45 if (!sample) in test_ringbuf_mem_map_key()
48 sample->pid = pid; in test_ringbuf_mem_map_key()
49 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf_mem_map_key()
50 sample->seq = ++seq; in test_ringbuf_mem_map_key()
51 sample->value = 42; in test_ringbuf_mem_map_key()
66 __builtin_memcpy(&sample_copy, sample, sizeof(struct sample)); in test_ringbuf_mem_map_key()
[all …]
A Dtest_ringbuf.c10 struct sample { struct
43 struct sample *sample; in test_ringbuf() local
48 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf()
49 if (!sample) { in test_ringbuf()
54 sample->pid = pid; in test_ringbuf()
55 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf()
56 sample->value = value; in test_ringbuf()
58 sample->seq = seq++; in test_ringbuf()
61 if (sample->seq & 1) { in test_ringbuf()
63 bpf_ringbuf_output(&ringbuf, sample, sizeof(*sample), flags); in test_ringbuf()
[all …]
A Dtest_ringbuf_n.c14 struct sample { struct
31 struct sample *sample; in test_ringbuf_n() argument
36 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf_n()
37 if (!sample) in test_ringbuf_n()
40 sample->pid = pid; in test_ringbuf_n()
41 sample->value = value; in test_ringbuf_n()
42 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf_n()
44 bpf_ringbuf_submit(sample, 0); in test_ringbuf_n()
A Dtest_ringbuf_multi.c9 struct sample { struct
60 struct sample *sample; in test_ringbuf() local
72 sample = bpf_ringbuf_reserve(rb, sizeof(*sample), 0); in test_ringbuf()
73 if (!sample) { in test_ringbuf()
78 sample->pid = pid; in test_ringbuf()
79 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf()
80 sample->value = value; in test_ringbuf()
82 sample->seq = total; in test_ringbuf()
85 bpf_ringbuf_submit(sample, 0); in test_ringbuf()
A Dtest_lirc_mode2_kern.c11 int bpf_decoder(unsigned int *sample) in bpf_decoder() argument
13 if (LIRC_IS_PULSE(*sample)) { in bpf_decoder()
14 unsigned int duration = LIRC_VALUE(*sample); in bpf_decoder()
17 bpf_rc_keydown(sample, 0x40, duration & 0xffff, 0); in bpf_decoder()
19 bpf_rc_pointer_rel(sample, (duration >> 8) & 0xff, in bpf_decoder()
A Duser_ringbuf_fail.c10 struct sample { struct
32 const struct sample *sample; in bad_access1() argument
34 sample = bpf_dynptr_data(dynptr - 1, 0, sizeof(*sample)); in bad_access1()
55 const struct sample *sample; in bad_access2() local
57 sample = bpf_dynptr_data(dynptr + 1, 0, sizeof(*sample)); in bad_access2()
/tools/perf/
A Dbuiltin-timechart.c295 sample = zalloc(sizeof(*sample)); in pid_put_sample()
676 c_state_end(tchart, sample->cpu, sample->time); in process_sample_power_end()
757 sample = zalloc(sizeof(*sample)); in pid_begin_io_sample()
758 if (!sample) in pid_begin_io_sample()
762 sample->fd = fd; in pid_begin_io_sample()
805 if (sample->end_time - sample->start_time < tchart->min_time) in pid_end_io_sample()
806 sample->end_time = sample->start_time + tchart->min_time; in pid_end_io_sample()
841 if (!sample->err && sample->bytes > c->max_bytes) in pid_end_io_sample()
1132 sample = sample->next; in draw_cpu_usage()
1161 for (sample = c->io_samples; sample; sample = sample->next) { in draw_io_bars()
[all …]
A Dbuiltin-script.c858 printed += fprintf(fp, "%7d/%-7d ", sample->pid, sample->tid); in perf_sample__fprintf_start()
1474 len = grab_bb(buffer, sample->ip, sample->ip, in perf_sample__fprintf_brstackinsn()
1652 if (!PRINT_FIELD(IPC) || !sample->cyc_cnt || !sample->insn_cnt) in perf_sample__fprintf_ipc()
1655 ipc = (sample->insn_cnt * 100) / sample->cyc_cnt; in perf_sample__fprintf_ipc()
2118 .sample = sample, in perf_sample__fprint_metric()
2234 sample->raw_data, sample->raw_size, in process_event()
2631 return print_event(tool, event, sample, machine, sample->pid, in process_cgroup_event()
2700 return print_event(tool, event, sample, machine, sample->pid, in process_switch_event()
2721 return print_event(tool, event, sample, machine, sample->pid, in process_lost_event()
2755 return print_event(tool, event, sample, machine, sample->pid, in process_bpf_events()
[all …]
/tools/testing/selftests/rust/
A Dtest_probe_samples.sh23 for sample in "${rust_sample_modules[@]}"; do
24 if ! /sbin/modprobe -n -q "$sample"; then
25 ktap_skip_all "module $sample is not found in /lib/modules/$(uname -r)"
32 for sample in "${rust_sample_modules[@]}"; do
33 if /sbin/modprobe -q "$sample"; then
34 /sbin/modprobe -q -r "$sample"
35 ktap_test_pass "$sample"
37 ktap_test_fail "$sample"
/tools/perf/scripts/python/
A Dintel-pt-events.py232 ts = sample["time"]
233 cpu = sample["cpu"]
234 pid = sample["pid"]
235 tid = sample["tid"]
238 vcpu = sample["vcpu"]
267 ip = sample["ip"]
269 if "cyc_cnt" in sample:
291 addr = sample["addr"]
300 ip = sample["ip"]
357 cpu = sample["cpu"]
[all …]
A Darm-cs-trace-disasm.py179 (sample['cpu'], sample['addr'], sample['phys_addr'], \
180 sample['ip'], sample['pid'], sample['tid'], \
181 sample['period'], sample['time'], sample_idx))
195 cpu = sample["cpu"]
196 pid = sample["pid"]
197 tid = sample["tid"]
203 ip = sample["ip"]
259 cpu = sample["cpu"]
260 ip = sample["ip"]
261 addr = sample["addr"]
[all …]
/tools/perf/arch/x86/util/
A Dkvm-stat.c33 key->key = evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
34 key->info = evsel__intval(evsel, sample, "type"); in mmio_event_get_key()
51 mmio_event_get_key(evsel, sample, key); in mmio_event_begin()
68 mmio_event_get_key(evsel, sample, key); in mmio_event_end()
93 struct perf_sample *sample, in ioport_event_get_key() argument
97 key->info = evsel__intval(evsel, sample, "rw"); in ioport_event_get_key()
101 struct perf_sample *sample, in ioport_event_begin() argument
105 ioport_event_get_key(evsel, sample, key); in ioport_event_begin()
137 struct perf_sample *sample, in msr_event_get_key() argument
145 struct perf_sample *sample, in msr_event_begin() argument
[all …]
A Darchinsn.c9 void arch_fetch_insn(struct perf_sample *sample, in arch_fetch_insn() argument
17 if (!sample->ip) in arch_fetch_insn()
19 len = thread__memcpy(thread, machine, sample->insn, sample->ip, sizeof(sample->insn), &is64bit); in arch_fetch_insn()
23 ret = insn_decode(&insn, sample->insn, len, in arch_fetch_insn()
26 sample->insn_len = insn.length; in arch_fetch_insn()
/tools/testing/selftests/ftrace/test.d/event/
A Devent-mod.tc7 rmmod trace-events-sample ||:
8 if ! modprobe trace-events-sample ; then
25 val=`cat events/sample-trace/enable`
49 val=`cat events/sample-trace/enable`
65 val=`cat events/sample-trace/enable`
125 rmmod trace-events-sample
132 modprobe trace-events-sample
138 rmmod trace-events-sample
144 modprobe trace-events-sample
150 rmmod trace-events-sample
[all …]
/tools/perf/dlfilters/
A Ddlfilter-show-cycles.c80 int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, void *ctx) in filter_event_early() argument
82 __s32 cpu = sample->cpu; in filter_event_early()
83 __s32 tid = sample->tid; in filter_event_early()
86 if (!sample->cyc_cnt) in filter_event_early()
89 pos = event_entry(sample->event); in filter_event_early()
92 cycles[cpu][pos] += sample->cyc_cnt; in filter_event_early()
94 add_entry(tid, pos, sample->cyc_cnt); in filter_event_early()
106 int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx) in filter_event() argument
108 __s32 cpu = sample->cpu; in filter_event()
109 __s32 tid = sample->tid; in filter_event()
[all …]
A Ddlfilter-test-api-v0.c181 if (sample->x != expected.x) \
202 CHECK(sample->size >= sizeof(struct perf_dlfilter_sample)); in check_sample()
217 CHECK(!sample->raw_data); in check_sample()
219 CHECK(!sample->brstack); in check_sample()
221 CHECK(!sample->raw_callchain); in check_sample()
224 CHECK(!strncmp(sample->event, EVENT_NAME, strlen(EVENT_NAME))); in check_sample()
267 if (perf_dlfilter_fns.resolve_address(ctx, sample->ip, &address_al)) in check_address_al()
317 if (check_sample(data, sample)) in do_checks()
327 check_object_code(ctx, sample)) in do_checks()
340 return do_checks(data, sample, ctx, true); in filter_event_early()
[all …]
A Ddlfilter-test-api-v2.c196 if (sample->x != expected.x) \
217 CHECK(sample->size >= sizeof(struct perf_dlfilter_sample)); in check_sample()
232 CHECK(!sample->raw_data); in check_sample()
234 CHECK(!sample->brstack); in check_sample()
236 CHECK(!sample->raw_callchain); in check_sample()
239 CHECK(!strncmp(sample->event, EVENT_NAME, strlen(EVENT_NAME))); in check_sample()
282 if (perf_dlfilter_fns.resolve_address(ctx, sample->ip, &address_al)) in check_address_al()
336 if (check_sample(data, sample)) in do_checks()
346 check_object_code(ctx, sample)) in do_checks()
359 return do_checks(data, sample, ctx, true); in filter_event_early()
[all …]
/tools/perf/arch/s390/util/
A Dkvm-stat.c27 struct perf_sample *sample, in event_icpt_insn_get_key() argument
32 insn = evsel__intval(evsel, sample, "instruction"); in event_icpt_insn_get_key()
38 struct perf_sample *sample, in event_sigp_get_key() argument
41 key->key = evsel__intval(evsel, sample, "order_code"); in event_sigp_get_key()
46 struct perf_sample *sample, in event_diag_get_key() argument
49 key->key = evsel__intval(evsel, sample, "code"); in event_diag_get_key()
54 struct perf_sample *sample, in event_icpt_prog_get_key() argument
57 key->key = evsel__intval(evsel, sample, "code"); in event_icpt_prog_get_key()
/tools/perf/arch/arm64/util/
A Dkvm-stat.c25 struct perf_sample *sample, in event_get_key() argument
29 key->key = evsel__intval(evsel, sample, kvm_exit_reason); in event_get_key()
38 key->key = evsel__intval(evsel, sample, kvm_trap_exit_reason); in event_get_key()
44 struct perf_sample *sample __maybe_unused, in event_begin()
51 struct perf_sample *sample, in event_end() argument
55 event_get_key(evsel, sample, key); in event_end()

Completed in 62 milliseconds

123456789