Home
last modified time | relevance | path

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

1234567

/tools/testing/selftests/bpf/progs/
Dtest_ringbuf.c9 struct sample { struct
43 struct sample *sample; in test_ringbuf() local
49 sample = bpf_ringbuf_reserve(&ringbuf, sizeof(*sample), 0); in test_ringbuf()
50 if (!sample) { in test_ringbuf()
55 sample->pid = pid; in test_ringbuf()
56 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf()
57 sample->value = value; in test_ringbuf()
59 sample->seq = seq++; in test_ringbuf()
62 if (sample->seq & 1) { in test_ringbuf()
64 bpf_ringbuf_output(&ringbuf, sample, sizeof(*sample), flags); in test_ringbuf()
[all …]
Dtest_ringbuf_multi.c9 struct sample { struct
48 struct sample *sample; in test_ringbuf() local
61 sample = bpf_ringbuf_reserve(rb, sizeof(*sample), 0); in test_ringbuf()
62 if (!sample) { in test_ringbuf()
67 sample->pid = pid; in test_ringbuf()
68 bpf_get_current_comm(sample->comm, sizeof(sample->comm)); in test_ringbuf()
69 sample->value = value; in test_ringbuf()
71 sample->seq = total; in test_ringbuf()
74 bpf_ringbuf_submit(sample, 0); in test_ringbuf()
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()
Dringbuf_bench.c36 long *sample, flags; in bench_ringbuf() local
41 sample = bpf_ringbuf_reserve(&ringbuf, in bench_ringbuf()
43 if (!sample) { in bench_ringbuf()
46 *sample = sample_val; in bench_ringbuf()
48 bpf_ringbuf_submit(sample, flags); in bench_ringbuf()
/tools/perf/
Dbuiltin-timechart.c273 struct cpu_sample *sample; in pid_put_sample() local
285 sample = zalloc(sizeof(*sample)); in pid_put_sample()
286 assert(sample != NULL); in pid_put_sample()
287 sample->start_time = start; in pid_put_sample()
288 sample->end_time = end; in pid_put_sample()
289 sample->type = type; in pid_put_sample()
290 sample->next = c->samples; in pid_put_sample()
291 sample->cpu = cpu; in pid_put_sample()
292 sample->backtrace = backtrace; in pid_put_sample()
293 c->samples = sample; in pid_put_sample()
[all …]
Dbuiltin-inject.c212 struct perf_sample *sample __maybe_unused, in perf_event__repipe()
220 struct perf_sample *sample __maybe_unused, in perf_event__drop()
228 struct perf_sample *sample, in perf_event__drop_aux() argument
234 inject->aux_id = sample->id; in perf_event__drop_aux()
242 struct perf_sample *sample) in perf_inject__cut_auxtrace_sample() argument
244 size_t sz1 = sample->aux_sample.data - (void *)event; in perf_inject__cut_auxtrace_sample()
245 size_t sz2 = event->header.size - sample->aux_sample.size - sz1; in perf_inject__cut_auxtrace_sample()
263 struct perf_sample *sample,
269 struct perf_sample *sample, in perf_event__repipe_sample() argument
278 return f(tool, event, sample, evsel, machine); in perf_event__repipe_sample()
[all …]
Dbuiltin-script.c677 static int perf_sample__fprintf_iregs(struct perf_sample *sample, in perf_sample__fprintf_iregs() argument
680 return perf_sample__fprintf_regs(&sample->intr_regs, in perf_sample__fprintf_iregs()
684 static int perf_sample__fprintf_uregs(struct perf_sample *sample, in perf_sample__fprintf_uregs() argument
687 return perf_sample__fprintf_regs(&sample->user_regs, in perf_sample__fprintf_uregs()
692 struct perf_sample *sample, in perf_sample__fprintf_start() argument
715 printed += fprintf(fp, "%5d/%-5d ", sample->pid, sample->tid); in perf_sample__fprintf_start()
717 printed += fprintf(fp, "%5d ", sample->pid); in perf_sample__fprintf_start()
719 printed += fprintf(fp, "%5d ", sample->tid); in perf_sample__fprintf_start()
723 printed += fprintf(fp, "%3d ", sample->cpu); in perf_sample__fprintf_start()
725 printed += fprintf(fp, "[%03d] ", sample->cpu); in perf_sample__fprintf_start()
[all …]
Dbuiltin-lock.c352 struct perf_sample *sample);
355 struct perf_sample *sample);
358 struct perf_sample *sample);
361 struct perf_sample *sample);
401 struct perf_sample *sample) in report_lock_acquire_event() argument
407 const char *name = evsel__strval(evsel, sample, "name"); in report_lock_acquire_event()
408 u64 tmp = evsel__intval(evsel, sample, "lockdep_addr"); in report_lock_acquire_event()
409 int flag = evsel__intval(evsel, sample, "flags"); in report_lock_acquire_event()
419 ts = thread_stat_findnew(sample->tid); in report_lock_acquire_event()
467 seq->prev_event_time = sample->time; in report_lock_acquire_event()
[all …]
Dbuiltin-mem.c145 struct perf_sample *sample, in dump_raw_samples() argument
152 if (machine__resolve(machine, &al, sample) < 0) { in dump_raw_samples()
176 sample->pid, in dump_raw_samples()
178 sample->tid, in dump_raw_samples()
180 sample->ip, in dump_raw_samples()
182 sample->addr, in dump_raw_samples()
184 sample->phys_addr, in dump_raw_samples()
186 sample->weight, in dump_raw_samples()
188 sample->data_src, in dump_raw_samples()
203 sample->pid, in dump_raw_samples()
[all …]
Dbuiltin-sched.c147 struct perf_sample *sample, struct machine *machine);
150 struct perf_sample *sample, struct machine *machine);
153 struct perf_sample *sample, struct machine *machine);
161 struct perf_sample *sample,
812 struct evsel *evsel, struct perf_sample *sample, in replay_wakeup_event() argument
815 const char *comm = evsel__strval(evsel, sample, "comm"); in replay_wakeup_event()
816 const u32 pid = evsel__intval(evsel, sample, "pid"); in replay_wakeup_event()
822 printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid); in replay_wakeup_event()
825 waker = register_pid(sched, sample->tid, "<unknown>"); in replay_wakeup_event()
828 add_sched_event_wakeup(sched, waker, sample->time, wakee); in replay_wakeup_event()
[all …]
/tools/perf/scripts/python/
Dintel-pt-events.py80 def print_common_start(comm, sample, name): argument
81 ts = sample["time"]
82 cpu = sample["cpu"]
83 pid = sample["pid"]
84 tid = sample["tid"]
89 def print_common_ip(sample, symbol, dso): argument
90 ip = sample["ip"]
95 sample = param_dict["sample"]
112 print_common_start(comm, sample, name)
114 print_common_ip(sample, symbol, dso)
[all …]
/tools/perf/arch/x86/util/
Dkvm-stat.c31 static void mmio_event_get_key(struct evsel *evsel, struct perf_sample *sample, in mmio_event_get_key() argument
34 key->key = evsel__intval(evsel, sample, "gpa"); in mmio_event_get_key()
35 key->info = evsel__intval(evsel, sample, "type"); in mmio_event_get_key()
43 struct perf_sample *sample, struct event_key *key) in mmio_event_begin() argument
51 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_WRITE) { in mmio_event_begin()
52 mmio_event_get_key(evsel, sample, key); in mmio_event_begin()
59 static bool mmio_event_end(struct evsel *evsel, struct perf_sample *sample, in mmio_event_end() argument
68 evsel__intval(evsel, sample, "type") == KVM_TRACE_MMIO_READ) { in mmio_event_end()
69 mmio_event_get_key(evsel, sample, key); in mmio_event_end()
94 struct perf_sample *sample, in ioport_event_get_key() argument
[all …]
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()
22 insn_init(&insn, sample->insn, len, is64bit); in arch_fetch_insn()
25 sample->insn_len = insn.length; in arch_fetch_insn()
/tools/perf/arch/s390/util/
Dkvm-stat.c28 struct perf_sample *sample, in event_icpt_insn_get_key() argument
33 insn = evsel__intval(evsel, sample, "instruction"); in event_icpt_insn_get_key()
39 struct perf_sample *sample, in event_sigp_get_key() argument
42 key->key = evsel__intval(evsel, sample, "order_code"); in event_sigp_get_key()
47 struct perf_sample *sample, in event_diag_get_key() argument
50 key->key = evsel__intval(evsel, sample, "code"); in event_diag_get_key()
55 struct perf_sample *sample, in event_icpt_prog_get_key() argument
58 key->key = evsel__intval(evsel, sample, "code"); in event_icpt_prog_get_key()
/tools/perf/util/
Dintel-pt.c243 struct perf_sample *sample) in intel_pt_dump_sample() argument
249 intel_pt_dump(pt, sample->aux_sample.data, sample->aux_sample.size); in intel_pt_dump_sample()
946 struct perf_sample *sample) in intel_pt_add_callchain() argument
949 sample->pid, in intel_pt_add_callchain()
950 sample->tid); in intel_pt_add_callchain()
952 thread_stack__sample_late(thread, sample->cpu, pt->chain, in intel_pt_add_callchain()
953 pt->synth_opts.callchain_sz + 1, sample->ip, in intel_pt_add_callchain()
956 sample->callchain = pt->chain; in intel_pt_add_callchain()
984 struct perf_sample *sample) in intel_pt_add_br_stack() argument
987 sample->pid, in intel_pt_add_br_stack()
[all …]
Devent.h269 static inline void *perf_sample__synth_ptr(struct perf_sample *sample) in perf_sample__synth_ptr() argument
271 return sample->raw_data - 4; in perf_sample__synth_ptr()
300 struct perf_sample *sample,
304 struct perf_sample *sample,
308 struct perf_sample *sample,
312 struct perf_sample *sample,
316 struct perf_sample *sample,
320 struct perf_sample *sample,
324 struct perf_sample *sample,
328 struct perf_sample *sample,
[all …]
Devent.c194 struct perf_sample *sample, in perf_event__process_comm() argument
197 return machine__process_comm_event(machine, event, sample); in perf_event__process_comm()
202 struct perf_sample *sample, in perf_event__process_namespaces() argument
205 return machine__process_namespaces_event(machine, event, sample); in perf_event__process_namespaces()
210 struct perf_sample *sample, in perf_event__process_cgroup() argument
213 return machine__process_cgroup_event(machine, event, sample); in perf_event__process_cgroup()
218 struct perf_sample *sample, in perf_event__process_lost() argument
221 return machine__process_lost_event(machine, event, sample); in perf_event__process_lost()
226 struct perf_sample *sample __maybe_unused, in perf_event__process_aux()
234 struct perf_sample *sample __maybe_unused, in perf_event__process_itrace_start()
[all …]
Dsession.c339 struct perf_sample *sample __maybe_unused, in process_event_sample_stub()
349 struct perf_sample *sample __maybe_unused, in process_event_stub()
463 if (tool->sample == NULL) in perf_tool__fill_defaults()
464 tool->sample = process_event_sample_stub; in perf_tool__fill_defaults()
1055 static void callchain__lbr_callstack_printf(struct perf_sample *sample) in callchain__lbr_callstack_printf() argument
1057 struct ip_callchain *callchain = sample->callchain; in callchain__lbr_callstack_printf()
1058 struct branch_stack *lbr_stack = sample->branch_stack; in callchain__lbr_callstack_printf()
1059 struct branch_entry *entries = perf_sample__branch_entries(sample); in callchain__lbr_callstack_printf()
1104 struct perf_sample *sample) in callchain__printf() argument
1107 struct ip_callchain *callchain = sample->callchain; in callchain__printf()
[all …]
/tools/perf/tests/
Ddwarf-unwind.c29 struct perf_sample *sample, in mmap_handler() argument
32 return machine__process_mmap2_event(machine, event, sample); in mmap_handler()
100 struct perf_sample sample; in test_dwarf_unwind__thread() local
104 memset(&sample, 0, sizeof(sample)); in test_dwarf_unwind__thread()
106 if (test__arch_unwind_sample(&sample, thread)) { in test_dwarf_unwind__thread()
112 &sample, MAX_STACK); in test_dwarf_unwind__thread()
122 zfree(&sample.user_stack.data); in test_dwarf_unwind__thread()
123 zfree(&sample.user_regs.regs); in test_dwarf_unwind__thread()
Dhists_link.c15 struct sample { struct
24 static struct sample fake_common_samples[] = { argument
37 static struct sample fake_samples[][5] = {
69 struct perf_sample sample = { .period = 1, .weight = 1, }; in add_hist_entries() local
81 sample.cpumode = PERF_RECORD_MISC_USER; in add_hist_entries()
82 sample.pid = fake_common_samples[k].pid; in add_hist_entries()
83 sample.tid = fake_common_samples[k].pid; in add_hist_entries()
84 sample.ip = fake_common_samples[k].ip; in add_hist_entries()
86 if (machine__resolve(machine, &al, &sample) < 0) in add_hist_entries()
90 NULL, NULL, &sample, true); in add_hist_entries()
[all …]
Dperf-record.c58 struct perf_sample sample; in test__PERF_RECORD() local
185 err = perf_evlist__parse_sample(evlist, event, &sample); in test__PERF_RECORD()
194 pr_info("%" PRIu64" %d ", sample.time, sample.cpu); in test__PERF_RECORD()
198 if (prev_time > sample.time) { in test__PERF_RECORD()
200 name, prev_time, sample.time); in test__PERF_RECORD()
204 prev_time = sample.time; in test__PERF_RECORD()
206 if (sample.cpu != cpu) { in test__PERF_RECORD()
208 name, cpu, sample.cpu); in test__PERF_RECORD()
212 if ((pid_t)sample.pid != evlist->workload.pid) { in test__PERF_RECORD()
214 name, evlist->workload.pid, sample.pid); in test__PERF_RECORD()
[all …]
/tools/perf/arch/arm/tests/
Ddwarf-unwind.c13 static int sample_ustack(struct perf_sample *sample, in sample_ustack() argument
16 struct stack_dump *stack = &sample->user_stack; in sample_ustack()
45 int test__arch_unwind_sample(struct perf_sample *sample, in test__arch_unwind_sample() argument
48 struct regs_dump *regs = &sample->user_regs; in test__arch_unwind_sample()
62 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
/tools/perf/arch/arm64/tests/
Ddwarf-unwind.c13 static int sample_ustack(struct perf_sample *sample, in sample_ustack() argument
16 struct stack_dump *stack = &sample->user_stack; in sample_ustack()
45 int test__arch_unwind_sample(struct perf_sample *sample, in test__arch_unwind_sample() argument
48 struct regs_dump *regs = &sample->user_regs; in test__arch_unwind_sample()
62 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
/tools/perf/arch/powerpc/tests/
Ddwarf-unwind.c14 static int sample_ustack(struct perf_sample *sample, in sample_ustack() argument
17 struct stack_dump *stack = &sample->user_stack; in sample_ustack()
46 int test__arch_unwind_sample(struct perf_sample *sample, in test__arch_unwind_sample() argument
49 struct regs_dump *regs = &sample->user_regs; in test__arch_unwind_sample()
63 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
/tools/perf/arch/x86/tests/
Ddwarf-unwind.c14 static int sample_ustack(struct perf_sample *sample, in sample_ustack() argument
17 struct stack_dump *stack = &sample->user_stack; in sample_ustack()
53 int test__arch_unwind_sample(struct perf_sample *sample, in test__arch_unwind_sample() argument
56 struct regs_dump *regs = &sample->user_regs; in test__arch_unwind_sample()
78 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()

1234567