/tools/perf/arch/s390/util/ |
D | header.c | 19 int get_cpuid(char *buffer, size_t sz) in get_cpuid() argument 23 if (strlen(cpuid) + 1 > sz) in get_cpuid()
|
/tools/perf/tests/ |
D | sample-parsing.c | 99 size_t sz = hweight_long(s1->user_regs.mask) * sizeof(u64); in samples_same() local 105 memcmp(s1->user_regs.regs, s2->user_regs.regs, sz))) { in samples_same() 130 size_t sz = hweight_long(s1->intr_regs.mask) * sizeof(u64); in samples_same() local 136 memcmp(s1->intr_regs.regs, s2->intr_regs.regs, sz))) { in samples_same() 210 size_t i, sz, bufsz; in do_test() local 230 sz = perf_event__sample_event_size(&sample, sample_type, read_format); in do_test() 231 bufsz = sz + 4096; /* Add a bit for overrun checking */ in do_test() 241 event->header.size = sz; in do_test() 256 if (i != sz) { in do_test() 258 i, sz); in do_test()
|
/tools/perf/util/ |
D | evsel.c | 1599 u64 sz; in perf_evsel__parse_sample() local 1723 sz = data->read.group.nr * in perf_evsel__parse_sample() 1725 OVERFLOW_CHECK(array, sz, max_size); in perf_evsel__parse_sample() 1728 array = (void *)array + sz; in perf_evsel__parse_sample() 1743 sz = data->callchain->nr * sizeof(u64); in perf_evsel__parse_sample() 1744 OVERFLOW_CHECK(array, sz, max_size); in perf_evsel__parse_sample() 1745 array = (void *)array + sz; in perf_evsel__parse_sample() 1775 sz = data->branch_stack->nr * sizeof(struct branch_entry); in perf_evsel__parse_sample() 1776 OVERFLOW_CHECK(array, sz, max_size); in perf_evsel__parse_sample() 1777 array = (void *)array + sz; in perf_evsel__parse_sample() [all …]
|
D | auxtrace.c | 261 u64 sz = buffer->size; in auxtrace_queues__split_buffer() local 266 while (sz > BUFFER_LIMIT_FOR_32_BIT) { in auxtrace_queues__split_buffer() 278 sz -= BUFFER_LIMIT_FOR_32_BIT; in auxtrace_queues__split_buffer() 282 buffer->size = sz; in auxtrace_queues__split_buffer() 351 off_t file_offset, size_t sz) in auxtrace_queues__add_indexed_event() argument 364 event->header.size != sz) { in auxtrace_queues__add_indexed_event() 630 auxtrace_index->entries[nr].sz = event->header.size; in auxtrace_index__auxtrace_event() 644 ent.sz = auxtrace_index->entries[i].sz; in auxtrace_index__do_write() 690 auxtrace_index->entries[nr].sz = bswap_64(ent.sz); in auxtrace_index__process_entry() 693 auxtrace_index->entries[nr].sz = ent.sz; in auxtrace_index__process_entry() [all …]
|
D | thread-stack.c | 47 size_t sz; member 99 size_t sz; member 111 size_t sz, new_sz; in thread_stack__grow() local 113 new_sz = ts->sz + STACK_GROWTH; in thread_stack__grow() 114 sz = new_sz * sizeof(struct thread_stack_entry); in thread_stack__grow() 116 new_stack = realloc(ts->stack, sz); in thread_stack__grow() 121 ts->sz = new_sz; in thread_stack__grow() 153 if (ts->cnt == ts->sz) { in thread_stack__push() 323 size_t sz, u64 ip) in thread_stack__sample() argument 330 chain->nr = min(sz, thread->ts->cnt + 1); in thread_stack__sample() [all …]
|
D | symbol-minimal.c | 25 #define NOTE_ALIGN(sz) (((sz) + 3) & ~3) argument 60 size_t sz = min(size, descsz); in read_build_id() local 61 memcpy(bf, ptr, sz); in read_build_id() 62 memset(bf + sz, 0, size - sz); in read_build_id()
|
D | strbuf.c | 36 char *strbuf_detach(struct strbuf *sb, size_t *sz) in strbuf_detach() argument 39 if (sz) in strbuf_detach() 40 *sz = sb->len; in strbuf_detach()
|
D | intel-bts.c | 95 size_t i, pos = 0, br_sz = sizeof(struct branch), sz; in intel_bts_dump() local 104 sz = br_sz; in intel_bts_dump() 106 sz = len; in intel_bts_dump() 109 for (i = 0; i < sz; i++) in intel_bts_dump() 123 pos += sz; in intel_bts_dump() 124 buf += sz; in intel_bts_dump() 125 len -= sz; in intel_bts_dump() 422 size_t sz, bsz = sizeof(struct branch); in intel_bts_process_buffer() local 427 sz = buffer->use_size; in intel_bts_process_buffer() 430 sz = buffer->size; in intel_bts_process_buffer() [all …]
|
D | symbol-elf.c | 421 size_t sz = min(size, descsz); in elf_read_build_id() local 422 memcpy(bf, ptr, sz); in elf_read_build_id() 423 memset(bf + sz, 0, size - sz); in elf_read_build_id() 488 size_t sz = min(descsz, size); in sysfs__read_build_id() local 489 if (read(fd, build_id, sz) == (ssize_t)sz) { in sysfs__read_build_id() 490 memset(build_id + sz, 0, size - sz); in sysfs__read_build_id() 1127 u64 sz; in elf_read_maps() local 1144 sz = min(phdr.p_memsz, phdr.p_filesz); in elf_read_maps() 1145 if (!sz) in elf_read_maps() 1147 err = mapfn(phdr.p_vaddr, sz, phdr.p_offset, data); in elf_read_maps() [all …]
|
D | header.c | 109 ssize_t sz, ret; in do_read_string() local 113 sz = readn(fd, &len, sizeof(len)); in do_read_string() 114 if (sz < (ssize_t)sizeof(len)) in do_read_string() 317 u32 nre, nri, sz; in write_event_desc() local 332 sz = (u32)sizeof(evsel->attr); in write_event_desc() 333 ret = do_write(fd, &sz, sizeof(sz)); in write_event_desc() 338 ret = do_write(fd, &evsel->attr, sz); in write_event_desc() 507 size_t sz; in build_cpu_topology() local 517 sz = nr * sizeof(char *); in build_cpu_topology() 519 addr = calloc(1, sizeof(*tp) + 2 * sz); in build_cpu_topology() [all …]
|
D | thread-stack.h | 98 size_t sz, u64 ip);
|
D | header.h | 134 int get_cpuid(char *buffer, size_t sz);
|
D | sort.c | 788 size_t sz = sizeof(out) - 1; /* -1 for null termination */ in hist_entry__tlb_snprintf() local 811 strncat(out, tlb_access[i], sz - l); in hist_entry__tlb_snprintf() 817 strncat(out, " hit", sz - l); in hist_entry__tlb_snprintf() 819 strncat(out, " miss", sz - l); in hist_entry__tlb_snprintf() 865 size_t sz = sizeof(out) - 1; /* -1 for null termination */ in hist_entry__lvl_snprintf() local 888 strncat(out, mem_lvl[i], sz - l); in hist_entry__lvl_snprintf() 894 strncat(out, " hit", sz - l); in hist_entry__lvl_snprintf() 896 strncat(out, " miss", sz - l); in hist_entry__lvl_snprintf() 933 size_t sz = sizeof(out) - 1; /* -1 for null termination */ in hist_entry__snoop_snprintf() local 949 strncat(out, snoop_access[i], sz - l); in hist_entry__snoop_snprintf()
|
D | session.c | 537 #define bswap_field(f, sz) \ in perf_event__attr_swap() argument 540 attr->f = bswap_##sz(attr->f); \ in perf_event__attr_swap() 2037 size_t nr = 0, i = 0, sz, max_nr, n; in perf_event__synthesize_id_index() local 2049 sz = sizeof(struct id_index_event) + n * sizeof(struct id_index_entry); in perf_event__synthesize_id_index() 2050 ev = zalloc(sz); in perf_event__synthesize_id_index() 2055 ev->id_index.header.size = sz; in perf_event__synthesize_id_index() 2089 sz = sizeof(struct id_index_event) + nr * sizeof(struct id_index_entry); in perf_event__synthesize_id_index() 2090 ev->id_index.header.size = sz; in perf_event__synthesize_id_index()
|
D | intel-pt.c | 687 size_t sz = sizeof(struct ip_callchain); in intel_pt_alloc_queue() local 689 sz += pt->synth_opts.callchain_sz * sizeof(u64); in intel_pt_alloc_queue() 690 ptq->chain = zalloc(sz); in intel_pt_alloc_queue() 696 size_t sz = sizeof(struct branch_stack); in intel_pt_alloc_queue() local 698 sz += pt->synth_opts.last_branch_sz * in intel_pt_alloc_queue() 700 ptq->last_branch = zalloc(sz); in intel_pt_alloc_queue() 703 ptq->last_branch_rb = zalloc(sz); in intel_pt_alloc_queue()
|
/tools/perf/arch/powerpc/util/ |
D | header.c | 19 get_cpuid(char *buffer, size_t sz) in get_cpuid() argument 26 nb = scnprintf(buffer, sz, "%lu,%lu$", PVR_VER(pvr), PVR_REV(pvr)); in get_cpuid()
|
/tools/perf/arch/x86/util/ |
D | intel-bts.c | 169 size_t sz = opts->auxtrace_snapshot_size; in intel_bts_recording_options() local 171 sz = round_up(sz, page_size) / page_size; in intel_bts_recording_options() 172 opts->auxtrace_mmap_pages = roundup_pow_of_two(sz); in intel_bts_recording_options() 202 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size; in intel_bts_recording_options() local 210 if (sz < min_sz || !is_power_of_2(sz)) { in intel_bts_recording_options() 282 const size_t sz = sizeof(struct intel_bts_snapshot_ref); in intel_bts_alloc_snapshot_refs() local 292 refs = calloc(new_cnt, sz); in intel_bts_alloc_snapshot_refs() 296 memcpy(refs, btsr->snapshot_refs, cnt * sz); in intel_bts_alloc_snapshot_refs()
|
D | header.c | 23 get_cpuid(char *buffer, size_t sz) in get_cpuid() argument 51 nb = scnprintf(buffer, sz, "%s,%u,%u,%u$", vendor, family, model, step); in get_cpuid()
|
D | intel-pt.c | 573 size_t sz = opts->auxtrace_snapshot_size; in intel_pt_recording_options() local 575 sz = round_up(sz, page_size) / page_size; in intel_pt_recording_options() 576 opts->auxtrace_mmap_pages = roundup_pow_of_two(sz); in intel_pt_recording_options() 611 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size; in intel_pt_recording_options() local 619 if (sz < min_sz || !is_power_of_2(sz)) { in intel_pt_recording_options() 763 const size_t sz = sizeof(struct intel_pt_snapshot_ref); in intel_pt_alloc_snapshot_refs() local 773 refs = calloc(new_cnt, sz); in intel_pt_alloc_snapshot_refs() 777 memcpy(refs, ptr->snapshot_refs, cnt * sz); in intel_pt_alloc_snapshot_refs()
|
/tools/perf/ui/tui/ |
D | helpline.c | 20 const size_t sz = sizeof(ui_helpline__current); in tui_helpline__push() local 26 strlcpy(ui_helpline__current, msg, sz); in tui_helpline__push()
|
/tools/testing/selftests/capabilities/ |
D | test_execve.c | 153 ssize_t sz = read(from, buf, sizeof(buf)); in copy_fromat_to() local 154 if (sz == 0) in copy_fromat_to() 156 if (sz < 0) in copy_fromat_to() 159 if (write(to, buf, sz) != sz) in copy_fromat_to()
|
/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()
|
D | memfd_test.c | 30 static int mfd_assert_new(const char *name, loff_t sz, unsigned int flags) in mfd_assert_new() argument 41 r = ftruncate(fd, sz); in mfd_assert_new() 43 printf("ftruncate(%llu) failed: %m\n", (unsigned long long)sz); in mfd_assert_new()
|
/tools/testing/selftests/x86/ |
D | test_syscall_vdso.c | 180 int sz; member 199 sigmask_desc.sz = 8; /* bytes */ in prep_args()
|
/tools/perf/ |
D | builtin-buildid-cache.c | 39 static int build_id_cache__kcore_dir(char *dir, size_t sz) in build_id_cache__kcore_dir() argument 51 scnprintf(dir, sz, "%s%02u", dt, (unsigned)tv.tv_usec / 10000); in build_id_cache__kcore_dir()
|