/kernel/linux/linux-5.10/tools/perf/util/ |
H A D | counts.c | 6 #include "counts.h" 11 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 perf_counts__delete(struct perf_counts *counts) perf_counts__delete() argument 46 perf_counts__reset(struct perf_counts *counts) perf_counts__reset() argument [all...] |
H A D | counts.h | 21 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);
|
H A D | branch.c | 24 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()
|
/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | counts.c | 6 #include "counts.h" 12 struct perf_counts *counts = zalloc(sizeof(*counts)); in perf_counts__new() local 14 if (counts) { in perf_counts__new() 19 free(counts); in perf_counts__new() 23 counts->values = values; in perf_counts__new() 27 xyarray__delete(counts->values); in perf_counts__new() 28 free(counts); in perf_counts__new() 32 counts->loaded = values; in perf_counts__new() 35 return counts; in perf_counts__new() 38 perf_counts__delete(struct perf_counts *counts) perf_counts__delete() argument 47 perf_counts__reset(struct perf_counts *counts) perf_counts__reset() argument [all...] |
H A D | counts.h | 20 perf_counts(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts() argument 22 return xyarray__entry(counts->values, cpu_map_idx, thread); in perf_counts() 26 perf_counts__is_loaded(struct perf_counts *counts, int cpu_map_idx, int thread) in perf_counts__is_loaded() argument 28 return *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)); in perf_counts__is_loaded() 32 perf_counts__set_loaded(struct perf_counts *counts, int cpu_map_idx, int thread, bool loaded) in perf_counts__set_loaded() argument 34 *((bool *) xyarray__entry(counts->loaded, cpu_map_idx, thread)) = loaded; in perf_counts__set_loaded() 38 void perf_counts__delete(struct perf_counts *counts); 39 void perf_counts__reset(struct perf_counts *counts);
|
H A D | stat.c | 7 #include "counts.h" 158 struct perf_counts *counts; in evsel__alloc_prev_raw_counts() local 160 counts = perf_counts__new(cpu_map_nr, nthreads); in evsel__alloc_prev_raw_counts() 161 if (counts) in evsel__alloc_prev_raw_counts() 162 evsel->prev_raw_counts = counts; in evsel__alloc_prev_raw_counts() 164 return counts ? 0 : -ENOMEM; in evsel__alloc_prev_raw_counts() 253 *perf_counts(evsel->counts, idx, thread) = in evsel__copy_prev_raw_counts() 272 * For GLOBAL aggregation mode, it updates the counts for each run in evsel__copy_res_stats() 275 *ps->aggr[0].counts.values = avg_stats(&ps->res_stats); in evsel__copy_res_stats() 371 if (evsel->err || evsel->counts in evsel__count_has_error() 605 struct perf_counts_values counts = { 0, }; evsel__update_percore_stats() local [all...] |
H A D | bpf_counter.c | 17 #include "counts.h" 233 struct perf_counts_values *counts; in bpf_program_profiler__read() local 242 counts = perf_counts(evsel->counts, idx, 0); in bpf_program_profiler__read() 243 counts->val = 0; in bpf_program_profiler__read() 244 counts->ena = 0; in bpf_program_profiler__read() 245 counts->run = 0; in bpf_program_profiler__read() 264 counts = perf_counts(evsel->counts, idx, 0); in bpf_program_profiler__read() 265 counts in bpf_program_profiler__read() 615 struct perf_counts_values *counts; bperf__read() local [all...] |
/kernel/linux/linux-6.6/tools/lib/perf/tests/ |
H A D | test-evsel.c | 40 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local 42 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu() 43 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu() 55 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local 75 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread() 76 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread() 87 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local 108 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 109 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable() 114 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 129 struct perf_counts_values counts = { .val = 0 }; test_stat_user_read() local 198 struct perf_counts_values counts; test_stat_read_format_single() local 233 struct perf_counts_values counts; test_stat_read_format_group() local [all...] |
H A D | test-evlist.c | 78 struct perf_counts_values counts = { .val = 0 }; in test_stat_cpu() local 80 perf_evsel__read(evsel, idx, 0, &counts); in test_stat_cpu() 81 __T("failed to read value for evsel", counts.val != 0); in test_stat_cpu() 94 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread() local 136 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread() 137 __T("failed to read value for evsel", counts.val != 0); in test_stat_thread() 149 struct perf_counts_values counts = { .val = 0 }; in test_stat_thread_enable() local 193 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 194 __T("failed to read value for evsel", counts.val == 0); in test_stat_thread_enable() 200 perf_evsel__read(evsel, 0, 0, &counts); in test_stat_thread_enable() 442 struct perf_counts_values counts[EVENT_NUM] = {{ .val = 0 },}; test_stat_multiplexing() local [all...] |
/kernel/linux/linux-5.10/tools/lib/perf/tests/ |
H A D | test-evsel.c | 36 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...] |
H A D | test-evlist.c | 68 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...] |
/kernel/linux/linux-5.10/arch/powerpc/platforms/pseries/ |
H A D | msi.c | 231 struct msi_counts *counts = data; in count_non_bridge_devices() local 241 counts->num_devices++; in count_non_bridge_devices() 248 struct msi_counts *counts = data; in count_spare_msis() local 252 if (dn == counts->requestor) in count_spare_msis() 253 req = counts->request; in count_spare_msis() 267 if (req < counts->quota) in count_spare_msis() 268 counts->spare += counts->quota - req; in count_spare_msis() 269 else if (req > counts->quota) in count_spare_msis() 270 counts in count_spare_msis() 278 struct msi_counts counts; msi_quota_for_device() local [all...] |
/kernel/linux/linux-6.6/arch/powerpc/platforms/pseries/ |
H A D | msi.c | 223 struct msi_counts *counts = data; in count_non_bridge_devices() local 233 counts->num_devices++; in count_non_bridge_devices() 240 struct msi_counts *counts = data; in count_spare_msis() local 244 if (dn == counts->requestor) in count_spare_msis() 245 req = counts->request; in count_spare_msis() 259 if (req < counts->quota) in count_spare_msis() 260 counts->spare += counts->quota - req; in count_spare_msis() 261 else if (req > counts->quota) in count_spare_msis() 262 counts in count_spare_msis() 270 struct msi_counts counts; msi_quota_for_device() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_btf_newkv.c | 34 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()
|
H A D | test_btf_haskv.c | 26 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()
|
H A D | test_btf_nokv.c | 23 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()
|
/kernel/linux/linux-6.6/drivers/media/v4l2-core/ |
H A D | v4l2-vp9.c | 1674 const struct v4l2_vp9_frame_symbol_counts *counts, in _adapt_coeff() 1683 *counts->eob[i][j][k][l][m][1], in _adapt_coeff() 1684 *counts->eob[i][j][k][l][m][0] - *counts->eob[i][j][k][l][m][1], in _adapt_coeff() 1687 adapt_probs_variant_a_coef(p, *counts->coeff[i][j][k][l][m], uf); in _adapt_coeff() 1694 const struct v4l2_vp9_frame_symbol_counts *counts, in _adapt_coef_probs() 1702 _adapt_coeff(i, j, k, probs, counts, uf); in _adapt_coef_probs() 1706 struct v4l2_vp9_frame_symbol_counts *counts, in v4l2_vp9_adapt_coef_probs() 1711 _adapt_coef_probs(probs, counts, 112); in v4l2_vp9_adapt_coef_probs() 1714 _adapt_coef_probs(probs, counts, 12 in v4l2_vp9_adapt_coef_probs() 1672 _adapt_coeff(unsigned int i, unsigned int j, unsigned int k, struct v4l2_vp9_frame_context *probs, const struct v4l2_vp9_frame_symbol_counts *counts, u32 uf) _adapt_coeff() argument 1693 _adapt_coef_probs(struct v4l2_vp9_frame_context *probs, const struct v4l2_vp9_frame_symbol_counts *counts, unsigned int uf) _adapt_coef_probs() argument 1705 v4l2_vp9_adapt_coef_probs(struct v4l2_vp9_frame_context *probs, struct v4l2_vp9_frame_symbol_counts *counts, bool use_128, bool frame_is_intra) v4l2_vp9_adapt_coef_probs() argument 1753 adapt_prob(u8 prob, const u32 counts[2]) adapt_prob() argument 1759 v4l2_vp9_adapt_noncoef_probs(struct v4l2_vp9_frame_context *probs, struct v4l2_vp9_frame_symbol_counts *counts, u8 reference_mode, u8 interpolation_filter, u8 tx_mode, u32 flags) v4l2_vp9_adapt_noncoef_probs() argument [all...] |
/kernel/linux/linux-5.10/samples/bpf/ |
H A D | sampleip_user.c | 82 struct ipcount counts[MAX_IPS]; variable 98 /* fetch IPs and counts */ in print_ip_map() 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[ in print_ip_map() [all...] |
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | sampleip_user.c | 82 struct ipcount counts[MAX_IPS]; variable 98 /* fetch IPs and counts */ in print_ip_map() 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 > _text_addr) { 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[ in print_ip_map() [all...] |
/kernel/linux/linux-5.10/drivers/md/ |
H A D | md-bitmap.c | 924 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_set_bit() 953 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_clear_bit() 981 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_test_bit() 1061 chunks = bitmap->counts.chunks; in md_bitmap_init_from_disk() 1070 int needed = ((sector_t)(i+1) << (bitmap->counts.chunkshift) in md_bitmap_init_from_disk() 1073 (sector_t)i << bitmap->counts.chunkshift, in md_bitmap_init_from_disk() 1151 int needed = ((sector_t)(i+1) << bitmap->counts.chunkshift in md_bitmap_init_from_disk() 1154 (sector_t)i << bitmap->counts.chunkshift, in md_bitmap_init_from_disk() 1226 struct bitmap_counts *counts; in md_bitmap_daemon_work() local 1280 counts in md_bitmap_daemon_work() 1988 struct bitmap_counts *counts; md_bitmap_copy_from_slot() local 2032 struct bitmap_counts *counts; md_bitmap_status() local [all...] |
/kernel/linux/linux-6.6/drivers/md/ |
H A D | md-bitmap.c | 951 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_set_bit() 982 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_clear_bit() 1012 unsigned long chunk = block >> bitmap->counts.chunkshift; in md_bitmap_file_test_bit() 1112 unsigned long chunks = bitmap->counts.chunks; in md_bitmap_init_from_disk() 1126 int needed = ((sector_t)(i+1) << (bitmap->counts.chunkshift) in md_bitmap_init_from_disk() 1129 (sector_t)i << bitmap->counts.chunkshift, in md_bitmap_init_from_disk() 1209 int needed = ((sector_t)(i+1) << bitmap->counts.chunkshift in md_bitmap_init_from_disk() 1212 (sector_t)i << bitmap->counts.chunkshift, in md_bitmap_init_from_disk() 1300 struct bitmap_counts *counts; in md_bitmap_daemon_work() local 1354 counts in md_bitmap_daemon_work() 2059 struct bitmap_counts *counts; md_bitmap_copy_from_slot() local 2103 struct bitmap_counts *counts; md_bitmap_status() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_btf_newkv.c | 22 struct ipv_counts *counts; in test_long_fname_2() local 25 counts = bpf_map_lookup_elem(&btf_map, &key); in test_long_fname_2() 26 if (!counts) in test_long_fname_2() 29 counts->v6++; in test_long_fname_2()
|
H A D | test_btf_nokv.c | 21 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()
|
/kernel/linux/linux-5.10/tools/lib/perf/Documentation/examples/ |
H A D | counting.c | 24 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()
|
/kernel/linux/linux-6.6/tools/lib/perf/Documentation/examples/ |
H A D | counting.c | 24 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()
|