/tools/perf/util/ |
D | mem-events.c | 116 int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info) in perf_mem__tlb_scnprintf() argument 122 sz -= 1; /* -1 for null termination */ in perf_mem__tlb_scnprintf() 141 l += scnprintf(out + l, sz - l, tlb_access[i]); in perf_mem__tlb_scnprintf() 144 l += scnprintf(out, sz - l, "N/A"); in perf_mem__tlb_scnprintf() 146 l += scnprintf(out + l, sz - l, " hit"); in perf_mem__tlb_scnprintf() 148 l += scnprintf(out + l, sz - l, " miss"); in perf_mem__tlb_scnprintf() 178 int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info) in perf_mem__lvl_scnprintf() argument 188 sz -= 1; /* -1 for null termination */ in perf_mem__lvl_scnprintf() 211 l += scnprintf(out + l, sz - l, mem_lvl[i]); in perf_mem__lvl_scnprintf() 221 l += scnprintf(out + l, sz - l, mem_lvlnum[lvl]); in perf_mem__lvl_scnprintf() [all …]
|
D | mem-events.h | 43 int perf_mem__tlb_scnprintf(char *out, size_t sz, struct mem_info *mem_info); 44 int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info); 45 int perf_mem__snp_scnprintf(char *out, size_t sz, struct mem_info *mem_info); 46 int perf_mem__lck_scnprintf(char *out, size_t sz, struct mem_info *mem_info);
|
D | time-utils.h | 38 int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz); 39 int timestamp__scnprintf_nsec(u64 timestamp, char *buf, size_t sz); 41 int fetch_current_timestamp(char *buf, size_t sz);
|
D | synthetic-events.c | 1129 size_t sz, result = sizeof(struct perf_record_sample); in perf_event__sample_event_size() local 1166 sz = sample->read.group.nr * in perf_event__sample_event_size() 1168 result += sz; in perf_event__sample_event_size() 1175 sz = (sample->callchain->nr + 1) * sizeof(u64); in perf_event__sample_event_size() 1176 result += sz; in perf_event__sample_event_size() 1185 sz = sample->branch_stack->nr * sizeof(struct branch_entry); in perf_event__sample_event_size() 1186 sz += sizeof(u64); in perf_event__sample_event_size() 1187 result += sz; in perf_event__sample_event_size() 1193 sz = hweight64(sample->user_regs.mask) * sizeof(u64); in perf_event__sample_event_size() 1194 result += sz; in perf_event__sample_event_size() [all …]
|
D | srccode.c | 101 unsigned long sz; in find_srcfile() local 136 sz = (h->maplen + page_size - 1) & ~(page_size - 1); in find_srcfile() 137 h->map = mmap(NULL, sz, PROT_READ, MAP_SHARED, fd, 0); in find_srcfile() 155 munmap(h->map, sz); in find_srcfile()
|
D | symbol-minimal.c | 30 #define NOTE_ALIGN(sz) (((sz) + 3) & ~3) argument 65 size_t sz = min(size, descsz); in read_build_id() local 66 memcpy(bf, ptr, sz); in read_build_id() 67 memset(bf + sz, 0, size - sz); in read_build_id()
|
D | cputopo.c | 179 size_t sz; in cpu_topology__new() local 196 sz = nr * sizeof(char *); in cpu_topology__new() 201 addr = calloc(1, sizeof(*tp) + nr_addr * sz); in cpu_topology__new() 208 addr += sz; in cpu_topology__new() 211 addr += sz; in cpu_topology__new()
|
D | strbuf.c | 37 char *strbuf_detach(struct strbuf *sb, size_t *sz) in strbuf_detach() argument 40 if (sz) in strbuf_detach() 41 *sz = sb->len; in strbuf_detach()
|
/tools/testing/selftests/bpf/ |
D | test_btf.h | 15 #define BTF_TYPE_INT_ENC(name, encoding, bits_offset, bits, sz) \ argument 16 BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_INT, 0, 0), sz), \ 28 #define BTF_STRUCT_ENC(name, nr_elems, sz) \ argument 29 BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_STRUCT, 0, nr_elems), sz) 31 #define BTF_UNION_ENC(name, nr_elems, sz) \ argument 32 BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_UNION, 0, nr_elems), sz)
|
/tools/testing/selftests/net/ |
D | reuseport_addr_any.c | 40 int opt, i, sz; in build_rcv_fd() local 52 sz = sizeof(addr4); in build_rcv_fd() 62 sz = sizeof(addr6); in build_rcv_fd() 84 if (bind(rcv_fds[i], addr, sz)) in build_rcv_fd() 108 int fd, sz; in connect_and_send() local 121 sz = sizeof(saddr4); in connect_and_send() 134 sz = sizeof(saddr6); in connect_and_send() 156 if (bind(fd, saddr, sz)) in connect_and_send() 159 if (connect(fd, daddr, sz)) in connect_and_send()
|
D | tcp_fastopen_backup_key.c | 96 int opt = 1, i, sz; in build_rcv_fd() local 105 sz = sizeof(addr4); in build_rcv_fd() 112 sz = sizeof(addr6); in build_rcv_fd() 132 if (bind(rcv_fds[i], addr, sz)) in build_rcv_fd() 150 int fd, sz, ret; in connect_and_send() local 164 sz = sizeof(saddr4); in connect_and_send() 177 sz = sizeof(saddr6); in connect_and_send() 192 if (bind(fd, saddr, sz)) in connect_and_send() 195 ret = sendto(fd, data, 1, MSG_FASTOPEN, daddr, sz); in connect_and_send()
|
/tools/perf/tests/ |
D | sample-parsing.c | 107 size_t sz = hweight_long(s1->user_regs.mask) * sizeof(u64); in samples_same() local 113 memcmp(s1->user_regs.regs, s2->user_regs.regs, sz))) { in samples_same() 138 size_t sz = hweight_long(s1->intr_regs.mask) * sizeof(u64); in samples_same() local 144 memcmp(s1->intr_regs.regs, s2->intr_regs.regs, sz))) { in samples_same() 224 size_t i, sz, bufsz; in do_test() local 244 sz = perf_event__sample_event_size(&sample, sample_type, read_format); in do_test() 245 bufsz = sz + 4096; /* Add a bit for overrun checking */ in do_test() 255 event->header.size = sz; in do_test() 270 if (i != sz) { in do_test() 272 i, sz); in do_test()
|
/tools/include/linux/ |
D | hashtable.h | 31 static inline void __hash_init(struct hlist_head *ht, unsigned int sz) in __hash_init() argument 35 for (i = 0; i < sz; i++) in __hash_init() 69 static inline bool __hash_empty(struct hlist_head *ht, unsigned int sz) in __hash_empty() argument 73 for (i = 0; i < sz; i++) in __hash_empty()
|
/tools/perf/arch/x86/util/ |
D | header.c | 27 __get_cpuid(char *buffer, size_t sz, const char *fmt) in __get_cpuid() argument 55 nb = scnprintf(buffer, sz, fmt, vendor, family, model, step); in __get_cpuid() 66 get_cpuid(char *buffer, size_t sz) in get_cpuid() argument 68 return __get_cpuid(buffer, sz, "%s,%u,%u,%u$"); in get_cpuid()
|
D | intel-bts.c | 163 size_t sz = opts->auxtrace_snapshot_size; in intel_bts_recording_options() local 165 sz = round_up(sz, page_size) / page_size; in intel_bts_recording_options() 166 opts->auxtrace_mmap_pages = roundup_pow_of_two(sz); in intel_bts_recording_options() 196 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size; in intel_bts_recording_options() local 204 if (sz < min_sz || !is_power_of_2(sz)) { in intel_bts_recording_options() 276 const size_t sz = sizeof(struct intel_bts_snapshot_ref); in intel_bts_alloc_snapshot_refs() local 286 refs = calloc(new_cnt, sz); in intel_bts_alloc_snapshot_refs() 290 memcpy(refs, btsr->snapshot_refs, cnt * sz); in intel_bts_alloc_snapshot_refs()
|
D | machine.c | 30 size_t sz; in add_extra_kernel_map() local 33 sz = sizeof(struct extra_kernel_map) * mi->max_cnt; in add_extra_kernel_map() 34 buf = realloc(mi->maps, sz); in add_extra_kernel_map()
|
/tools/lib/subcmd/ |
D | pager.c | 74 struct winsize sz; in setup_pager() local 80 if (ioctl(1, TIOCGWINSZ, &sz) == 0) in setup_pager() 81 pager_columns = sz.ws_col; in setup_pager()
|
/tools/perf/arch/powerpc/util/ |
D | header.c | 20 get_cpuid(char *buffer, size_t sz) in get_cpuid() argument 27 nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); in get_cpuid()
|
/tools/perf/pmu-events/ |
D | json.c | 88 unsigned sz; in parse_json() local 94 sz = *size * 16; in parse_json() 95 tokens = malloc(sz); in parse_json() 100 sz / sizeof(jsmntok_t)); in parse_json()
|
/tools/perf/ui/tui/ |
D | helpline.c | 22 const size_t sz = sizeof(ui_helpline__current); in tui_helpline__push() local 28 strlcpy(ui_helpline__current, msg, sz); in tui_helpline__push()
|
/tools/perf/arch/s390/util/ |
D | header.c | 30 int get_cpuid(char *buffer, size_t sz) in get_cpuid() argument 131 nbytes = snprintf(buffer, sz, "%s,%s,%s,%s,%s", in get_cpuid() 135 nbytes = snprintf(buffer, sz, "%s,%s,%s", manufacturer, type, in get_cpuid() 137 return (nbytes >= sz) ? ENOBUFS : 0; in get_cpuid()
|
/tools/lib/bpf/ |
D | hashmap.c | 42 map->sz = 0; in hashmap__init() 67 map->cap = map->cap_bits = map->sz = 0; in hashmap__clear() 81 return map->sz; in hashmap__size() 92 return (map->cap == 0) || ((map->sz + 1) * 4 / 3 > map->cap); in hashmap_needs_to_grow() 196 map->sz++; in hashmap__insert() 232 map->sz--; in hashmap__delete()
|
/tools/testing/selftests/memfd/ |
D | fuse_test.c | 44 static int mfd_assert_new(const char *name, loff_t sz, unsigned int flags) in mfd_assert_new() argument 55 r = ftruncate(fd, sz); in mfd_assert_new() 57 printf("ftruncate(%llu) failed: %m\n", (unsigned long long)sz); in mfd_assert_new()
|
/tools/testing/selftests/capabilities/ |
D | test_execve.c | 164 ssize_t sz = read(from, buf, sizeof(buf)); in copy_fromat_to() local 165 if (sz == 0) in copy_fromat_to() 167 if (sz < 0) in copy_fromat_to() 170 if (write(to, buf, sz) != sz) in copy_fromat_to()
|
/tools/perf/arch/arm64/util/ |
D | arm-spe.c | 106 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size; in arm_spe_recording_options() local 109 if (sz < min_sz || !is_power_of_2(sz)) { in arm_spe_recording_options()
|