Home
last modified time | relevance | path

Searched refs:counts (Results 1 – 25 of 38) sorted by relevance

12

/tools/perf/util/
Dcounts.c11 struct perf_counts *counts = zalloc(sizeof(*counts)); in perf_counts__new() local
13 if (counts) { in perf_counts__new()
18 free(counts); in perf_counts__new()
22 counts->values = values; in perf_counts__new()
26 xyarray__delete(counts->values); in perf_counts__new()
27 free(counts); in perf_counts__new()
31 counts->loaded = values; in perf_counts__new()
34 return counts; in perf_counts__new()
37 void perf_counts__delete(struct perf_counts *counts) in perf_counts__delete() argument
39 if (counts) { in perf_counts__delete()
[all …]
Dcounts.h21 perf_counts(struct perf_counts *counts, int cpu, int thread) in perf_counts() argument
23 return xyarray__entry(counts->values, cpu, thread); in perf_counts()
27 perf_counts__is_loaded(struct perf_counts *counts, int cpu, int thread) in perf_counts__is_loaded() argument
29 return *((bool *) xyarray__entry(counts->loaded, cpu, thread)); in perf_counts__is_loaded()
33 perf_counts__set_loaded(struct perf_counts *counts, int cpu, int thread, bool loaded) in perf_counts__set_loaded() argument
35 *((bool *) xyarray__entry(counts->loaded, cpu, thread)) = loaded; in perf_counts__set_loaded()
39 void perf_counts__delete(struct perf_counts *counts);
40 void perf_counts__reset(struct perf_counts *counts);
Dbranch.c24 st->counts[flags->type]++; in branch_type_count()
67 total += st->counts[i]; in branch_type_stat_display()
101 if (st->counts[i] > 0) in branch_type_stat_display()
105 (double)st->counts[i] / (double)total); in branch_type_stat_display()
120 total += st->counts[i]; in branch_type_str()
135 if (st->counts[i] > 0) in branch_type_str()
Dstat.c153 struct perf_counts *counts; in evsel__alloc_prev_raw_counts() local
155 counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_prev_raw_counts()
156 if (counts) in evsel__alloc_prev_raw_counts()
157 evsel->prev_raw_counts = counts; in evsel__alloc_prev_raw_counts()
159 return counts ? 0 : -ENOMEM; in evsel__alloc_prev_raw_counts()
239 *perf_counts(evsel->counts, cpu, thread) = in perf_evsel__copy_prev_raw_counts()
245 evsel->counts->aggr = evsel->prev_raw_counts->aggr; in perf_evsel__copy_prev_raw_counts()
329 struct perf_counts_values *aggr = &evsel->counts->aggr; in process_counter_values()
390 perf_counts(counter->counts, cpu, thread))) in process_counter_maps()
401 struct perf_counts_values *aggr = &counter->counts->aggr; in perf_stat_process_counter()
[all …]
Dstat-display.c438 if (run == 0 || ena == 0 || counter->counts->scaled == -1) { in printout()
511 val += perf_counts(counter->counts, cpu, 0)->val; in aggr_update_shadow()
600 struct perf_counts_values *counts; in aggr_cb() local
607 counts = perf_counts(counter->counts, cpu, 0); in aggr_cb()
612 if (counts->ena == 0 || counts->run == 0 || in aggr_cb()
613 counter->counts->scaled == -1) { in aggr_cb()
618 ad->val += counts->val; in aggr_cb()
619 ad->ena += counts->ena; in aggr_cb()
620 ad->run += counts->run; in aggr_cb()
717 val += perf_counts(counter->counts, cpu, thread)->val; in sort_aggr_thread()
[all …]
Dbranch.h74 u64 counts[PERF_BR_MAX]; member
Dpython-ext-sources28 util/counts.c
/tools/lib/perf/tests/
Dtest-evsel.c36 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local
38 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu()
39 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu()
51 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local
71 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread()
72 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread()
83 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local
104 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
105 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable()
110 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
[all …]
Dtest-evlist.c68 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local
70 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu()
71 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu()
84 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local
122 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread()
123 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread()
135 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local
175 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
176 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable()
182 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
[all …]
/tools/testing/selftests/bpf/progs/
Dtest_btf_newkv.c34 struct ipv_counts *counts; in test_long_fname_2() local
37 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2()
38 if (!counts) in test_long_fname_2()
41 counts->v6++; in test_long_fname_2()
44 counts = bpf_map_lookup_elem(&btf_map_legacy, &key); in test_long_fname_2()
45 if (!counts) in test_long_fname_2()
Dtest_btf_nokv.c23 struct ipv_counts *counts; in test_long_fname_2() local
26 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2()
27 if (!counts) in test_long_fname_2()
30 counts->v6++; in test_long_fname_2()
Dtest_btf_haskv.c26 struct ipv_counts *counts; in test_long_fname_2() local
29 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2()
30 if (!counts) in test_long_fname_2()
33 counts->v6++; in test_long_fname_2()
/tools/lib/perf/Documentation/examples/
Dcounting.c24 struct perf_counts_values counts; in main() local
73 perf_evsel__read(evsel, 0, 0, &counts); in main()
75 counts.val, counts.ena, counts.run); in main()
/tools/lib/perf/Documentation/
Dlibperf-counting.txt37 * reads and displays event counts
171 Now we need to get the counts from events, following code iterates through the
172 events list and read counts:
177 82 perf_evsel__read(evsel, 0, 0, &counts);
179 84 counts.val, counts.ena, counts.run);
/tools/perf/tests/
Dopenat-syscall.c54 if (perf_counts(evsel->counts, 0, 0)->val != nr_openat_calls) { in test__openat_syscall_event()
56 nr_openat_calls, perf_counts(evsel->counts, 0, 0)->val); in test__openat_syscall_event()
Dopenat-syscall-all-cpus.c113 if (perf_counts(evsel->counts, cpu, 0)->val != expected) { in test__openat_syscall_event_on_all_cpus()
115 expected, cpus->map[cpu], perf_counts(evsel->counts, cpu, 0)->val); in test__openat_syscall_event_on_all_cpus()
/tools/memory-model/scripts/
Dcmplitmushist.sh36 echo Matching Observation result and counts: $2
71 echo Matching Observation result and counts: $obsline 1>&2
/tools/perf/scripts/python/bin/
Dsyscall-counts-report10 perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/syscall-counts.py $comm
Dsyscall-counts-by-pid-report10 perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/syscall-counts-by-pid.py $comm
/tools/perf/Documentation/
Dperf-stat.txt50 'percore' is a event qualifier that sums up the event counts for both
123 Do not aggregate counts across all monitored CPUs.
135 print counts using a CSV-style output to make it easy to import directly into
241 If the metric exists, it is calculated by the counts generated in this interval and the metric is p…
261 Aggregate counts per processor socket for system-wide mode measurements. This
268 Aggregate counts per processor die for system-wide mode measurements. This
275 Aggregate counts per physical processor for system-wide mode measurements. This
281 Aggregate counts per monitored threads, when monitoring threads (-t option)
285 Aggregate counts per NUMA nodes for system-wide mode measurements. This
336 Aggregate counts per processor socket for system-wide mode measurements.
[all …]
Dperf-script-python.txt32 'syscall-counts' script you see when you list the available perf script
37 The syscall-counts script is a simple script, but demonstrates all the
190 # mv perf-script.py syscall-counts.py
191 # perf script -s syscall-counts.py
260 and having the counts we've tallied as values.
316 # perf script -s syscall-counts.py
356 # cat kernel-source/tools/perf/scripts/python/bin/syscall-counts-record
368 # cat kernel-source/tools/perf/scripts/python/bin/syscall-counts-report
371 # description: system-wide syscall counts
372 perf script -s ~/libexec/perf-core/scripts/python/syscall-counts.py
[all …]
/tools/bpf/bpftool/skeleton/
Dprofiler.bpf.c39 } counts SEC(".maps");
116 count = bpf_map_lookup_elem(&counts, &zero); in BPF_PROG()
/tools/usb/
Dffs-test.c233 const __le32 counts[]; in descs_to_legacy() member
235 const __le32 *counts = in->counts; in descs_to_legacy() local
255 ret = le32_to_cpu(*counts); \ in descs_to_legacy()
257 ++counts; \ in descs_to_legacy()
267 descs_start = (const void *)counts; in descs_to_legacy()
/tools/perf/
Dbuiltin-stat.c321 perf_counts(counter->counts, cpu, thread); in read_single_counter()
347 count = perf_counts(counter->counts, cpu, thread); in read_counter_cpu()
353 if (!perf_counts__is_loaded(counter->counts, cpu, thread) && in read_counter_cpu()
355 counter->counts->scaled = -1; in read_counter_cpu()
356 perf_counts(counter->counts, cpu, thread)->ena = 0; in read_counter_cpu()
357 perf_counts(counter->counts, cpu, thread)->run = 0; in read_counter_cpu()
361 perf_counts__set_loaded(counter->counts, cpu, thread, false); in read_counter_cpu()
/tools/kvm/kvm_stat/
Dkvm_stat.txt15 kvm_stat prints counts of KVM kernel module trace events. These events signify

12