| /linux/tools/perf/arch/x86/util/ |
| H A D | intel-bts.c | 287 int cnt = btsr->snapshot_ref_cnt, new_cnt = cnt * 2; in intel_bts_alloc_snapshot_refs() 290 if (!new_cnt) in intel_bts_alloc_snapshot_refs() 291 new_cnt = 16; in intel_bts_alloc_snapshot_refs() 293 while (new_cnt <= idx) in intel_bts_alloc_snapshot_refs() 294 new_cnt *= 2; in intel_bts_alloc_snapshot_refs() 296 refs = calloc(new_cnt, sz); in intel_bts_alloc_snapshot_refs() 303 btsr->snapshot_ref_cnt = new_cnt; 283 int cnt = btsr->snapshot_ref_cnt, new_cnt = cnt * 2; intel_bts_alloc_snapshot_refs() local
|
| H A D | intel-pt.c | 929 int cnt = ptr->snapshot_ref_cnt, new_cnt = cnt * 2; in intel_pt_alloc_snapshot_refs() 932 if (!new_cnt) in intel_pt_alloc_snapshot_refs() 933 new_cnt = 16; in intel_pt_alloc_snapshot_refs() 935 while (new_cnt <= idx) in intel_pt_alloc_snapshot_refs() 936 new_cnt *= 2; in intel_pt_alloc_snapshot_refs() 938 refs = calloc(new_cnt, sz); in intel_pt_alloc_snapshot_refs() 945 ptr->snapshot_ref_cnt = new_cnt; 925 int cnt = ptr->snapshot_ref_cnt, new_cnt = cnt * 2; intel_pt_alloc_snapshot_refs() local
|
| /linux/tools/crypto/tcrypt/ |
| H A D | tcrypt_speed_compare.py | 159 new_cnt = item[f"new_{key}"] 161 new_sum += new_cnt 162 differ = round((new_cnt - base_cnt)*100/base_cnt, 2)
|
| /linux/tools/perf/arch/arm64/util/ |
| H A D | arm-spe.c | 503 int cnt = ptr->wrapped_cnt, new_cnt, i; in arm_spe_alloc_wrapped_array() 514 new_cnt = idx + 1; in arm_spe_alloc_wrapped_array() 519 wrapped = reallocarray(ptr->wrapped, new_cnt, sizeof(bool)); in arm_spe_alloc_wrapped_array() 526 for (i = cnt; i < new_cnt; i++) in arm_spe_alloc_wrapped_array() 529 ptr->wrapped_cnt = new_cnt; in arm_spe_alloc_wrapped_array() 501 int cnt = ptr->wrapped_cnt, new_cnt, i; arm_spe_alloc_wrapped_array() local
|
| /linux/drivers/rtc/ |
| H A D | sysfs.c | 310 size_t old_cnt = 0, add_cnt = 0, new_cnt; in rtc_add_groups() local 328 new_cnt = old_cnt + add_cnt + 1; in rtc_add_groups() 329 groups = devm_kcalloc(&rtc->dev, new_cnt, sizeof(*groups), GFP_KERNEL); in rtc_add_groups()
|
| /linux/net/vmw_vsock/ |
| H A D | virtio_transport.c | 296 int new_cnt; in virtio_transport_cancel_pkt() local 298 new_cnt = atomic_sub_return(cnt, &vsock->queued_replies); in virtio_transport_cancel_pkt() 299 if (new_cnt + cnt >= virtqueue_get_vring_size(rx_vq) && in virtio_transport_cancel_pkt() 300 new_cnt < virtqueue_get_vring_size(rx_vq)) in virtio_transport_cancel_pkt()
|
| /linux/drivers/perf/hisilicon/ |
| H A D | hisi_pcie_pmu.c | 449 u64 new_cnt, prev_cnt, delta; in hisi_pcie_pmu_event_update() local 453 new_cnt = hisi_pcie_pmu_read_counter(event); in hisi_pcie_pmu_event_update() 455 new_cnt) != prev_cnt); in hisi_pcie_pmu_event_update() 457 delta = (new_cnt - prev_cnt) & HISI_PCIE_MAX_PERIOD; in hisi_pcie_pmu_event_update()
|
| /linux/tools/lib/bpf/ |
| H A D | linker.c | 314 size_t new_cnt = linker->sec_cnt ? linker->sec_cnt + 1 : 2; in add_dst_sec() local 316 secs = libbpf_reallocarray(secs, new_cnt, sizeof(*secs)); in add_dst_sec() 321 memset(secs + linker->sec_cnt, 0, (new_cnt - linker->sec_cnt) * sizeof(*secs)); in add_dst_sec() 324 linker->sec_cnt = new_cnt; in add_dst_sec() 326 sec = &linker->secs[new_cnt - 1]; in add_dst_sec() 327 sec->id = new_cnt - 1; in add_dst_sec() 645 size_t new_cnt = obj->sec_cnt ? obj->sec_cnt + 1 : 2; in add_src_sec() local 647 secs = libbpf_reallocarray(secs, new_cnt, sizeof(*secs)); in add_src_sec() 652 memset(secs + obj->sec_cnt, 0, (new_cnt - obj->sec_cnt) * sizeof(*secs)); in add_src_sec() 655 obj->sec_cnt = new_cnt; in add_src_sec() [all …]
|
| H A D | usdt.c | 917 size_t new_cnt = man->free_spec_cnt + usdt_link->spec_cnt; in bpf_link_usdt_detach() local 920 new_free_ids = libbpf_reallocarray(man->free_spec_ids, new_cnt, in bpf_link_usdt_detach() 931 if (new_free_ids || new_cnt == 0) { in bpf_link_usdt_detach() 935 man->free_spec_cnt = new_cnt; in bpf_link_usdt_detach()
|
| H A D | btf.c | 205 size_t new_cnt; in libbpf_add_mem() local 215 new_cnt = *cap_cnt; in libbpf_add_mem() 216 new_cnt += new_cnt / 4; /* expand by 25% */ in libbpf_add_mem() 217 if (new_cnt < 16) /* but at least 16 elements */ in libbpf_add_mem() 218 new_cnt = 16; in libbpf_add_mem() 219 if (new_cnt > max_cnt) /* but not exceeding a set limit */ in libbpf_add_mem() 220 new_cnt = max_cnt; in libbpf_add_mem() 221 if (new_cnt < cur_cnt + add_cnt) /* also ensure we have enough memory */ in libbpf_add_mem() 222 new_cnt = cur_cnt + add_cnt; in libbpf_add_mem() 224 new_data = libbpf_reallocarray(*data, new_cnt, elem_sz); in libbpf_add_mem() [all …]
|
| H A D | libbpf.c | 6733 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc; in append_subprog_relos() local 6739 relos = libbpf_reallocarray(main_prog->reloc_desc, new_cnt, sizeof(*relos)); in append_subprog_relos() 6744 if (!relos && new_cnt) in append_subprog_relos() 6750 for (i = main_prog->nr_reloc; i < new_cnt; i++) in append_subprog_relos() 6756 main_prog->nr_reloc = new_cnt; in append_subprog_relos() 6783 size_t new_cnt; in bpf_object__append_subprog_code() local 6788 new_cnt = main_prog->insns_cnt + subprog->insns_cnt; in bpf_object__append_subprog_code() 6789 insns = libbpf_reallocarray(main_prog->insns, new_cnt, sizeof(*insns)); in bpf_object__append_subprog_code() 6795 main_prog->insns_cnt = new_cnt; in bpf_object__append_subprog_code()
|
| /linux/drivers/perf/ |
| H A D | cxl_pmu.c | 801 u64 new_cnt, prev_cnt, delta; in __cxl_pmu_read() local 805 new_cnt = cxl_pmu_read_counter(event); in __cxl_pmu_read() 806 } while (local64_cmpxchg(&hwc->prev_count, prev_cnt, new_cnt) != prev_cnt); in __cxl_pmu_read() 812 delta = (new_cnt - prev_cnt) & GENMASK_ULL(info->counter_width - 1, 0); in __cxl_pmu_read()
|
| /linux/tools/perf/ |
| H A D | builtin-inject.c | 1521 static int synthesize_id_index(struct perf_inject *inject, size_t new_cnt) in guest_session__start() 1526 size_t from = evlist__nr_entries(evlist) - new_cnt; in guest_session__start() 1370 synthesize_id_index(struct perf_inject * inject,size_t new_cnt) synthesize_id_index() argument
|
| /linux/kernel/bpf/ |
| H A D | verifier.c | 19456 int i, ret, new_cnt; in do_check_subprogs() local 19466 new_cnt = 0; in do_check_subprogs() 19490 new_cnt++; in do_check_subprogs() 19496 if (new_cnt) in do_check_subprogs()
|