Home
last modified time | relevance | path

Searched refs:new_cnt (Results 1 – 16 of 16) sorted by relevance

/linux/tools/perf/arch/x86/util/
H A Dintel-bts.c287 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 Dintel-pt.c929 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 Dtcrypt_speed_compare.py159 new_cnt = item[f"new_{key}"]
161 new_sum += new_cnt
162 differ = round((new_cnt - base_cnt)*100/base_cnt, 2)
/linux/fs/ntfs/
H A Drunlist.c1739 int new_1st_cnt, new_2nd_cnt, new_3rd_cnt, new_cnt; in ntfs_rl_insert_range() local
1805 new_cnt = new_1st_cnt + new_2nd_cnt + new_3rd_cnt; in ntfs_rl_insert_range()
1806 new_cnt += dst_rl_split.lcn >= LCN_HOLE ? 1 : 0; in ntfs_rl_insert_range()
1807 new_rl = kvzalloc_objs(*new_rl, new_cnt, GFP_NOFS); in ntfs_rl_insert_range()
1859 int new_1st_cnt, dst_3rd_cnt, new_cnt, punch_cnt, merge_cnt; in ntfs_rl_punch_hole() local
1896 new_cnt = dst_cnt - (int)(e_rl - s_rl + 1) + 3; in ntfs_rl_punch_hole()
1897 new_rl = kvzalloc_objs(struct runlist_element, new_cnt, GFP_NOFS); in ntfs_rl_punch_hole()
1972 if (new_1st_cnt + 1 < new_cnt && in ntfs_rl_punch_hole()
1977 } else if (new_1st_cnt + 1 < new_cnt && in ntfs_rl_punch_hole()
1990 (int)(&new_rl[new_cnt - 1] - src_rl) + 1); in ntfs_rl_punch_hole()
[all …]
/linux/tools/perf/arch/arm64/util/
H A Darm-spe.c503 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 Dsysfs.c310 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 Dvirtio_transport.c296 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/vhost/
H A Dvsock.c350 int new_cnt; in vhost_transport_cancel_pkt() local
352 new_cnt = atomic_sub_return(cnt, &vsock->queued_replies); in vhost_transport_cancel_pkt()
353 if (new_cnt + cnt >= tx_vq->num && new_cnt < tx_vq->num) in vhost_transport_cancel_pkt()
/linux/tools/lib/bpf/
H A Dlinker.c314 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 Dusdt.c917 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 Dbtf.c205 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 Dlibbpf.c6740 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc; in append_subprog_relos() local
6746 relos = libbpf_reallocarray(main_prog->reloc_desc, new_cnt, sizeof(*relos)); in append_subprog_relos()
6751 if (!relos && new_cnt) in append_subprog_relos()
6757 for (i = main_prog->nr_reloc; i < new_cnt; i++) in append_subprog_relos()
6763 main_prog->nr_reloc = new_cnt; in append_subprog_relos()
6790 size_t new_cnt; in bpf_object__append_subprog_code() local
6795 new_cnt = main_prog->insns_cnt + subprog->insns_cnt; in bpf_object__append_subprog_code()
6796 insns = libbpf_reallocarray(main_prog->insns, new_cnt, sizeof(*insns)); in bpf_object__append_subprog_code()
6802 main_prog->insns_cnt = new_cnt; in bpf_object__append_subprog_code()
/linux/drivers/perf/hisilicon/
H A Dhisi_pcie_pmu.c449 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/drivers/perf/
H A Dcxl_pmu.c801 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 Dbuiltin-inject.c1521 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 Dverifier.c19683 int context, i, ret, new_cnt; in do_check_subprogs()
19698 new_cnt = 0; in do_check_subprogs()
19719 new_cnt++; in do_check_subprogs()
19727 if (new_cnt) in do_check_main()
19675 int context, i, ret, new_cnt; do_check_subprogs() local