Home
last modified time | relevance | path

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

123456789

/linux/tools/perf/util/
A 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()
27 free(counts); in perf_counts__new()
31 counts->loaded = values; in perf_counts__new()
34 return counts; in perf_counts__new()
39 if (counts) { in perf_counts__delete()
42 free(counts); in perf_counts__delete()
48 xyarray__reset(counts->loaded); in perf_counts__reset()
[all …]
A 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);
A Dbpf_counter.c243 perf_counts(evsel->counts, cpu, 0)->val = 0; in bpf_program_profiler__read()
244 perf_counts(evsel->counts, cpu, 0)->ena = 0; in bpf_program_profiler__read()
245 perf_counts(evsel->counts, cpu, 0)->run = 0; in bpf_program_profiler__read()
260 perf_counts(evsel->counts, cpu, 0)->val += values[cpu].counter; in bpf_program_profiler__read()
261 perf_counts(evsel->counts, cpu, 0)->ena += values[cpu].enabled; in bpf_program_profiler__read()
636 perf_counts(evsel->counts, i, 0)->val = values[cpu].counter; in bperf__read()
637 perf_counts(evsel->counts, i, 0)->ena = values[cpu].enabled; in bperf__read()
638 perf_counts(evsel->counts, i, 0)->run = values[cpu].running; in bperf__read()
642 perf_counts(evsel->counts, 0, i)->val = 0; in bperf__read()
643 perf_counts(evsel->counts, 0, i)->ena = 0; in bperf__read()
[all …]
A 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()
A Dstat.c157 struct perf_counts *counts; in evsel__alloc_prev_raw_counts() local
159 counts = perf_counts__new(ncpus, nthreads); in evsel__alloc_prev_raw_counts()
160 if (counts) in evsel__alloc_prev_raw_counts()
161 evsel->prev_raw_counts = counts; in evsel__alloc_prev_raw_counts()
163 return counts ? 0 : -ENOMEM; in evsel__alloc_prev_raw_counts()
243 *perf_counts(evsel->counts, cpu, thread) = in evsel__copy_prev_raw_counts()
249 evsel->counts->aggr = evsel->prev_raw_counts->aggr; in evsel__copy_prev_raw_counts()
361 struct perf_counts_values *aggr = &evsel->counts->aggr; in process_counter_values()
422 perf_counts(counter->counts, cpu, thread))) in process_counter_maps()
433 struct perf_counts_values *aggr = &counter->counts->aggr; in perf_stat_process_counter()
[all …]
A Dbpf_counter_cgroup.c249 struct perf_counts_values *counts; in bperf_cgrp__read() local
277 counts = perf_counts(evsel->counts, i, 0); in bperf_cgrp__read()
278 counts->val = values[cpu].counter; in bperf_cgrp__read()
279 counts->ena = values[cpu].enabled; in bperf_cgrp__read()
280 counts->run = values[cpu].running; in bperf_cgrp__read()
A Dstat-display.c532 val += perf_counts(counter->counts, cpu, 0)->val; in aggr_update_shadow()
641 struct perf_counts_values *counts; in aggr_cb() local
648 counts = perf_counts(counter->counts, cpu, 0); in aggr_cb()
653 if (counts->ena == 0 || counts->run == 0 || in aggr_cb()
654 counter->counts->scaled == -1) { in aggr_cb()
659 ad->val += counts->val; in aggr_cb()
660 ad->ena += counts->ena; in aggr_cb()
661 ad->run += counts->run; in aggr_cb()
945 val = perf_counts(counter->counts, cpu, 0)->val; in print_no_aggr_metric()
946 ena = perf_counts(counter->counts, cpu, 0)->ena; in print_no_aggr_metric()
[all …]
/linux/tools/lib/perf/tests/
A Dtest-evsel.c37 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local
39 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu()
52 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local
72 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread()
105 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
111 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
159 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_user_read()
168 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_user_read()
169 start = counts.val; in test_stat_user_read()
173 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_user_read()
[all …]
A Dtest-evlist.c74 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local
76 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu()
77 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu()
90 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local
132 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread()
133 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread()
145 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local
189 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
190 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable()
196 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable()
[all …]
/linux/arch/powerpc/platforms/pseries/
A Dmsi.c232 counts->num_devices++; in count_non_bridge_devices()
244 req = counts->request; in count_spare_msis()
258 if (req < counts->quota) in count_spare_msis()
259 counts->spare += counts->quota - req; in count_spare_msis()
261 counts->over_quota++; in count_spare_msis()
269 struct msi_counts counts; in msi_quota_for_device() local
297 counts.quota = total / counts.num_devices; in msi_quota_for_device()
303 counts.request = request; in msi_quota_for_device()
308 counts.spare += total % counts.num_devices; in msi_quota_for_device()
311 if (counts.over_quota) in msi_quota_for_device()
[all …]
/linux/drivers/md/
A Dmd-bitmap.c1231 struct bitmap_counts *counts; in md_bitmap_daemon_work() local
1285 counts = &bitmap->counts; in md_bitmap_daemon_work()
1286 spin_lock_irq(&counts->lock); in md_bitmap_daemon_work()
1755 bp = bitmap->counts.bp; in md_bitmap_free()
1994 counts = &bitmap->counts; in md_bitmap_copy_from_slot()
2034 counts = &bitmap->counts; in md_bitmap_status()
2039 counts->pages - counts->missing_pages, in md_bitmap_status()
2040 counts->pages, in md_bitmap_status()
2041 (counts->pages - counts->missing_pages) in md_bitmap_status()
2146 old_counts = bitmap->counts; in md_bitmap_resize()
[all …]
/linux/samples/bpf/
A Dsampleip_user.c82 struct ipcount counts[MAX_IPS]; variable
102 counts[i].ip = next_key; in print_ip_map()
103 counts[i++].count = value; in print_ip_map()
109 qsort(counts, max, sizeof(struct ipcount), count_cmp); in print_ip_map()
111 if (counts[i].ip > PAGE_OFFSET) { in print_ip_map()
112 sym = ksym_search(counts[i].ip); in print_ip_map()
118 printf("0x%-17llx %-32s %u\n", counts[i].ip, sym->name, in print_ip_map()
119 counts[i].count); in print_ip_map()
121 printf("0x%-17llx %-32s %u\n", counts[i].ip, "(user)", in print_ip_map()
122 counts[i].count); in print_ip_map()
A Doffwaketime_kern.c37 } counts SEC(".maps");
101 val = bpf_map_lookup_elem(&counts, &key); in update_counts()
103 bpf_map_update_elem(&counts, &key, &zero, BPF_NOEXIST); in update_counts()
104 val = bpf_map_lookup_elem(&counts, &key); in update_counts()
A Dtrace_event_kern.c25 } counts SEC(".maps");
71 val = bpf_map_lookup_elem(&counts, &key); in bpf_prog1()
75 bpf_map_update_elem(&counts, &key, &one, BPF_NOEXIST); in bpf_prog1()
A Dtest_lru_dist.c175 unsigned int counts = 0; in read_keys() local
191 counts++; in read_keys()
193 counts++; /* in case the last line has no \n */ in read_keys()
195 retkeys = malloc(counts * sizeof(unsigned long long)); in read_keys()
198 counts = 0; in read_keys()
200 retkeys[counts++] = strtoull(l, NULL, 10); in read_keys()
205 return counts; in read_keys()
/linux/tools/testing/selftests/bpf/progs/
A Dtest_btf_newkv.c32 struct ipv_counts *counts; in test_long_fname_2() local
35 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2()
36 if (!counts) in test_long_fname_2()
39 counts->v6++; in test_long_fname_2()
42 counts = bpf_map_lookup_elem(&btf_map_legacy, &key); in test_long_fname_2()
43 if (!counts) in test_long_fname_2()
A Dtest_btf_nokv.c21 struct ipv_counts *counts; in test_long_fname_2() local
24 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2()
25 if (!counts) in test_long_fname_2()
28 counts->v6++; in test_long_fname_2()
A Dtest_btf_haskv.c24 struct ipv_counts *counts; in test_long_fname_2() local
27 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2()
28 if (!counts) in test_long_fname_2()
31 counts->v6++; in test_long_fname_2()
/linux/tools/testing/kunit/
A Dkunit_parser.py47 self.counts = TestCounts()
54 str(self.counts) + ')')
62 self.counts.errors += 1
122 self.passed += counts.passed
123 self.failed += counts.failed
646 counts = test.counts
675 counts = test.counts
678 counts.add_subtest_counts(t.counts)
679 if counts.total() == 0:
680 counts.add_status(status)
[all …]
/linux/drivers/scsi/
A Dch.c229 ch->counts[i]) in ch_elem_to_typecode()
317 ch->counts[CHET_MT] = in ch_readconfig()
321 ch->counts[CHET_ST] = in ch_readconfig()
325 ch->counts[CHET_IE] = in ch_readconfig()
329 ch->counts[CHET_DT] = in ch_readconfig()
333 ch->counts[CHET_MT]); in ch_readconfig()
336 ch->counts[CHET_ST]); in ch_readconfig()
339 ch->counts[CHET_IE]); in ch_readconfig()
342 ch->counts[CHET_DT]); in ch_readconfig()
659 if (ch->counts[CHET_V1]) { in ch_ioctl()
[all …]
/linux/arch/x86/kernel/cpu/resctrl/
A Dpseudo_lock.c1044 counts->miss_before = miss_before; in measure_residency_fn()
1045 counts->hits_before = hits_before; in measure_residency_fn()
1046 counts->miss_after = miss_after; in measure_residency_fn()
1047 counts->hits_after = hits_after; in measure_residency_fn()
1081 trace_pseudo_lock_l2(counts.hits_after - counts.hits_before, in measure_l2_residency()
1082 counts.miss_after - counts.miss_before); in measure_l2_residency()
1121 counts.miss_after -= counts.miss_before; in measure_l3_residency()
1131 counts.hits_after -= counts.hits_before; in measure_l3_residency()
1133 counts.hits_after -= min(counts.miss_after, counts.hits_after); in measure_l3_residency()
1135 counts.hits_after -= counts.hits_before; in measure_l3_residency()
[all …]
/linux/arch/x86/hyperv/
A Dhv_proc.c27 int *counts; in hv_call_deposit_pages() local
48 counts = kcalloc(HV_DEPOSIT_MAX, sizeof(int), GFP_KERNEL); in hv_call_deposit_pages()
49 if (!counts) { in hv_call_deposit_pages()
74 counts[i] = 1 << order; in hv_call_deposit_pages()
75 num_pages -= counts[i]; in hv_call_deposit_pages()
89 for (j = 0; j < counts[i]; ++j, ++page_count) in hv_call_deposit_pages()
107 for (j = 0; j < counts[i]; ++j) in hv_call_deposit_pages()
113 kfree(counts); in hv_call_deposit_pages()
/linux/tools/lib/perf/Documentation/examples/
A 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()
/linux/tools/lib/perf/Documentation/
A 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);
/linux/drivers/scsi/elx/efct/
A Defct_hw.c3052 counts[EFCT_HW_LINK_STAT_CRC_COUNT].counter = in efct_hw_cb_link_stat()
3068 counts[EFCT_HW_LINK_STAT_RCV_EOFA_COUNT].counter = in efct_hw_cb_link_stat()
3074 counts[EFCT_HW_LINK_STAT_RCV_SOFF_COUNT].counter = in efct_hw_cb_link_stat()
3139 counts[EFCT_HW_HOST_STAT_TX_KBYTE_COUNT].counter = in efct_hw_cb_host_stat()
3141 counts[EFCT_HW_HOST_STAT_RX_KBYTE_COUNT].counter = in efct_hw_cb_host_stat()
3143 counts[EFCT_HW_HOST_STAT_TX_FRAME_COUNT].counter = in efct_hw_cb_host_stat()
3145 counts[EFCT_HW_HOST_STAT_RX_FRAME_COUNT].counter = in efct_hw_cb_host_stat()
3147 counts[EFCT_HW_HOST_STAT_TX_SEQ_COUNT].counter = in efct_hw_cb_host_stat()
3149 counts[EFCT_HW_HOST_STAT_RX_SEQ_COUNT].counter = in efct_hw_cb_host_stat()
3155 counts[EFCT_HW_HOSY_STAT_RX_P_BSY_COUNT].counter = in efct_hw_cb_host_stat()
[all …]

Completed in 44 milliseconds

123456789