Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 500) sorted by relevance

12345678910>>...20

/tools/perf/util/
Dtrace-event-read.c26 static int __do_read(int fd, void *buf, int size) in __do_read() argument
28 int rsize = size; in __do_read()
30 while (size) { in __do_read()
31 int ret = read(fd, buf, size); in __do_read()
45 size -= ret; in __do_read()
52 static int do_read(void *data, int size) in do_read() argument
56 r = __do_read(input_fd, data, size); in do_read()
59 size, r); in do_read()
69 static void skip(int size) in skip() argument
74 while (size) { in skip()
[all …]
Dtrace-event-parse.c16 int *offset, int *size, const char *type) in get_common_field() argument
22 if (!*size) { in get_common_field()
32 *size = field->size; in get_common_field()
35 return tep_read_number(pevent, context->event_data + *offset, *size); in get_common_field()
41 static int size; in common_lock_depth() local
44 ret = get_common_field(context, &size, &offset, in common_lock_depth()
55 static int size; in common_flags() local
58 ret = get_common_field(context, &size, &offset, in common_flags()
69 static int size; in common_pc() local
72 ret = get_common_field(context, &size, &offset, in common_pc()
[all …]
Dbpf-loader.h54 int err, char *buf, size_t size);
64 char *buf, size_t size);
68 char *buf, size_t size);
78 size_t size);
80 int bpf__strerror_apply_obj_config(int err, char *buf, size_t size);
84 int bpf__strerror_setup_output_event(struct evlist *evlist, int err, char *buf, size_t size);
147 __bpf_strerror(char *buf, size_t size) in __bpf_strerror() argument
149 if (!size) in __bpf_strerror()
153 size); in __bpf_strerror()
154 buf[size - 1] = '\0'; in __bpf_strerror()
[all …]
Dzstd.c61 size_t ret, size, compressed = 0; in zstd_compress_stream_to_records() local
66 while (input.pos < input.size) { in zstd_compress_stream_to_records()
68 size = process_header(record, 0); in zstd_compress_stream_to_records()
69 compressed += size; in zstd_compress_stream_to_records()
70 dst += size; in zstd_compress_stream_to_records()
71 dst_size -= size; in zstd_compress_stream_to_records()
82 size = output.pos; in zstd_compress_stream_to_records()
83 size = process_header(record, size); in zstd_compress_stream_to_records()
84 compressed += size; in zstd_compress_stream_to_records()
85 dst += size; in zstd_compress_stream_to_records()
[all …]
Dtop.c17 #define SNPRINTF(buf, size, fmt, args...) \ argument
19 size_t r = snprintf(buf, size, fmt, ## args); \
20 r > size ? size : r; \
23 size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size) in perf_top__header_snprintf() argument
46 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
56 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
75 ret += SNPRINTF(bf + ret, size - ret, "%" PRIu64 "%s ", in perf_top__header_snprintf()
80 ret += SNPRINTF(bf + ret, size - ret, "%s", evsel__name(top->sym_evsel)); in perf_top__header_snprintf()
82 ret += SNPRINTF(bf + ret, size - ret, "], "); in perf_top__header_snprintf()
85 ret += SNPRINTF(bf + ret, size - ret, " (target_pid: %s", in perf_top__header_snprintf()
[all …]
/tools/testing/selftests/vm/
Dmap_fixed_noreplace.c28 static unsigned long find_base_addr(unsigned long size) in find_base_addr() argument
34 addr = mmap(NULL, size, PROT_NONE, flags, -1, 0); in find_base_addr()
40 if (munmap(addr, size) != 0) { in find_base_addr()
50 unsigned long flags, addr, size, page_size; in main() local
56 size = 5 * page_size; in main()
57 base_addr = find_base_addr(size); in main()
68 size = 5 * page_size; in main()
69 p = mmap((void *)addr, size, PROT_NONE, flags, -1, 0); in main()
71 printf("mmap() @ 0x%lx-0x%lx p=%p result=%m\n", addr, addr + size, p); in main()
89 size = 3 * page_size; in main()
[all …]
Dva_128TBswitch.c35 unsigned long size; member
49 .size = PAGE_SIZE,
61 .size = 2 * PAGE_SIZE,
72 .size = PAGE_SIZE,
79 .size = 2 * PAGE_SIZE,
85 .size = 2 * PAGE_SIZE,
92 .size = 2 * PAGE_SIZE,
99 .size = 2 * PAGE_SIZE,
106 .size = 2 * PAGE_SIZE,
113 .size = 2 * PAGE_SIZE,
[all …]
Dhmm-tests.c39 unsigned long size; member
153 munmap(buffer->ptr, buffer->size); in hmm_buffer_free()
161 static int hmm_create_file(unsigned long size) in hmm_create_file() argument
172 r = ftruncate(fd, size); in hmm_create_file()
224 unsigned long size; in TEST_F() local
232 size = npages << self->page_shift; in TEST_F()
238 buffer->size = size; in TEST_F()
239 buffer->mirror = malloc(size); in TEST_F()
242 buffer->ptr = mmap(NULL, size, in TEST_F()
253 for (ptr = buffer->ptr; i < size / sizeof(*ptr); ++i) in TEST_F()
[all …]
Dgup_benchmark.c32 __u64 size; member
41 unsigned long size = 128 * MB; in main() local
59 size = atoi(optarg) * MB; in main()
113 p = mmap(NULL, size, PROT_READ | PROT_WRITE, flags, filed, 0); in main()
121 madvise(p, size, MADV_HUGEPAGE); in main()
123 madvise(p, size, MADV_NOHUGEPAGE); in main()
125 for (; (unsigned long)p < gup.addr + size; p += PAGE_SIZE) in main()
129 gup.size = size; in main()
137 if (gup.size != size) in main()
138 printf(", truncated (size: %lld)", gup.size); in main()
/tools/perf/trace/beauty/
Dbeauty.h30 size_t strarray__scnprintf(struct strarray *sa, char *bf, size_t size, const char *intfmt, bool sho…
31 size_t strarray__scnprintf_suffix(struct strarray *sa, char *bf, size_t size, const char *intfmt, b…
32 size_t strarray__scnprintf_flags(struct strarray *sa, char *bf, size_t size, bool show_prefix, unsi…
34 bool strarray__strtoul(struct strarray *sa, char *bf, size_t size, u64 *ret);
35 bool strarray__strtoul_flags(struct strarray *sa, char *bf, size_t size, u64 *ret);
57 size_t strarrays__scnprintf(struct strarrays *sas, char *bf, size_t size, const char *intfmt, bool …
59 bool strarrays__strtoul(struct strarrays *sas, char *bf, size_t size, u64 *ret);
61 size_t pid__scnprintf_fd(struct trace *trace, pid_t pid, int fd, char *bf, size_t size);
83 int size; member
110 int size; member
[all …]
Dioctl.c21 static size_t ioctl__scnprintf_tty_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_tty_cmd() argument
42 return scnprintf(bf, size, "%s", strarray__ioctl_tty_cmd.entries[nr]); in ioctl__scnprintf_tty_cmd()
44 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'T', nr, dir); in ioctl__scnprintf_tty_cmd()
47 static size_t ioctl__scnprintf_drm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_drm_cmd() argument
53 return scnprintf(bf, size, "DRM_%s", strarray__drm_ioctl_cmds.entries[nr]); in ioctl__scnprintf_drm_cmd()
55 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'd', nr, dir); in ioctl__scnprintf_drm_cmd()
58 static size_t ioctl__scnprintf_sndrv_pcm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_sndrv_pcm_cmd() argument
64 return scnprintf(bf, size, "SNDRV_PCM_%s", strarray__sndrv_pcm_ioctl_cmds.entries[nr]); in ioctl__scnprintf_sndrv_pcm_cmd()
66 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'A', nr, dir); in ioctl__scnprintf_sndrv_pcm_cmd()
69 static size_t ioctl__scnprintf_sndrv_ctl_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_sndrv_ctl_cmd() argument
[all …]
Dmmap.c7 static size_t mmap__scnprintf_prot(unsigned long prot, char *bf, size_t size, bool show_prefix) in mmap__scnprintf_prot() argument
9 return strarray__scnprintf_flags(&strarray__mmap_prot, bf, size, show_prefix, prot); in mmap__scnprintf_prot()
12 static size_t syscall_arg__scnprintf_mmap_prot(char *bf, size_t size, struct syscall_arg *arg) in syscall_arg__scnprintf_mmap_prot() argument
17 return scnprintf(bf, size, "%sNONE", arg->show_string_prefix ? strarray__mmap_prot.prefix : ""); in syscall_arg__scnprintf_mmap_prot()
19 return mmap__scnprintf_prot(prot, bf, size, arg->show_string_prefix); in syscall_arg__scnprintf_mmap_prot()
27 static size_t mmap__scnprintf_flags(unsigned long flags, char *bf, size_t size, bool show_prefix) in mmap__scnprintf_flags() argument
29 return strarray__scnprintf_flags(&strarray__mmap_flags, bf, size, show_prefix, flags); in mmap__scnprintf_flags()
32 static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size, in syscall_arg__scnprintf_mmap_flags() argument
40 return mmap__scnprintf_flags(flags, bf, size, arg->show_string_prefix); in syscall_arg__scnprintf_mmap_flags()
48 static size_t mremap__scnprintf_flags(unsigned long flags, char *bf, size_t size, bool show_prefix) in mremap__scnprintf_flags() argument
[all …]
Dfcntl.c12 static size_t fcntl__scnprintf_getfd(unsigned long val, char *bf, size_t size, bool show_prefix) in fcntl__scnprintf_getfd() argument
14 return val ? scnprintf(bf, size, "%s", "0") : in fcntl__scnprintf_getfd()
15 scnprintf(bf, size, "%s%s", show_prefix ? "FD_" : "", "CLOEXEC"); in fcntl__scnprintf_getfd()
18 static size_t syscall_arg__scnprintf_fcntl_getfd(char *bf, size_t size, struct syscall_arg *arg) in syscall_arg__scnprintf_fcntl_getfd() argument
20 return fcntl__scnprintf_getfd(arg->val, bf, size, arg->show_string_prefix); in syscall_arg__scnprintf_fcntl_getfd()
23 static size_t fcntl__scnprintf_getlease(unsigned long val, char *bf, size_t size, bool show_prefix) in fcntl__scnprintf_getlease() argument
28 return strarray__scnprintf(&strarray__fcntl_setlease, bf, size, "%x", show_prefix, val); in fcntl__scnprintf_getlease()
31 static size_t syscall_arg__scnprintf_fcntl_getlease(char *bf, size_t size, struct syscall_arg *arg) in syscall_arg__scnprintf_fcntl_getlease() argument
33 return fcntl__scnprintf_getlease(arg->val, bf, size, arg->show_string_prefix); in syscall_arg__scnprintf_fcntl_getlease()
36 size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_arg *arg) in syscall_arg__scnprintf_fcntl_cmd() argument
[all …]
Dsockaddr.c13 static size_t af_inet__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_inet__scnprintf() argument
17 return scnprintf(bf, size, ", port: %d, addr: %s", ntohs(sin->sin_port), in af_inet__scnprintf()
21 static size_t af_inet6__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_inet6__scnprintf() argument
26 size_t printed = scnprintf(bf, size, ", port: %d, addr: %s", ntohs(sin6->sin6_port), in af_inet6__scnprintf()
29 printed += scnprintf(bf + printed, size - printed, ", flowinfo: %lu", flowinfo); in af_inet6__scnprintf()
31 printed += scnprintf(bf + printed, size - printed, ", scope_id: %lu", sin6->sin6_scope_id); in af_inet6__scnprintf()
36 static size_t af_local__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_local__scnprintf() argument
39 return scnprintf(bf, size, ", path: %s", sun->sun_path); in af_local__scnprintf()
42 static size_t (*af_scnprintfs[])(struct sockaddr *sa, char *bf, size_t size) = {
48 …ic size_t syscall_arg__scnprintf_augmented_sockaddr(struct syscall_arg *arg, char *bf, size_t size) in syscall_arg__scnprintf_augmented_sockaddr() argument
[all …]
Dprctl.c16 static size_t prctl__scnprintf_option(int option, char *bf, size_t size, bool show_prefix) in prctl__scnprintf_option() argument
18 return strarray__scnprintf(&strarray__prctl_options, bf, size, "%d", show_prefix, option); in prctl__scnprintf_option()
21 static size_t prctl__scnprintf_set_mm(int option, char *bf, size_t size, bool show_prefix) in prctl__scnprintf_set_mm() argument
24 return strarray__scnprintf(&strarray__prctl_set_mm_options, bf, size, "%d", show_prefix, option); in prctl__scnprintf_set_mm()
27 size_t syscall_arg__scnprintf_prctl_arg2(char *bf, size_t size, struct syscall_arg *arg) in syscall_arg__scnprintf_prctl_arg2() argument
32 return prctl__scnprintf_set_mm(arg->val, bf, size, arg->show_string_prefix); in syscall_arg__scnprintf_prctl_arg2()
38 return syscall_arg__scnprintf_hex(bf, size, arg); in syscall_arg__scnprintf_prctl_arg2()
40 return syscall_arg__scnprintf_long(bf, size, arg); in syscall_arg__scnprintf_prctl_arg2()
43 size_t syscall_arg__scnprintf_prctl_arg3(char *bf, size_t size, struct syscall_arg *arg) in syscall_arg__scnprintf_prctl_arg3() argument
48 return syscall_arg__scnprintf_hex(bf, size, arg); in syscall_arg__scnprintf_prctl_arg3()
[all …]
Dpkey_alloc.c12 size_t strarray__scnprintf_flags(struct strarray *sa, char *bf, size_t size, bool show_prefix, unsi… in strarray__scnprintf_flags() argument
19 return scnprintf(bf, size, "%s%s", show_prefix ? sa->prefix : "", s); in strarray__scnprintf_flags()
20 return scnprintf(bf, size, "%d", 0); in strarray__scnprintf_flags()
30 printed += scnprintf(bf + printed, size - printed, "|"); in strarray__scnprintf_flags()
33 …printed += scnprintf(bf + printed, size - printed, "%s%s", show_prefix ? sa->prefix : "", sa->entr… in strarray__scnprintf_flags()
35 printed += scnprintf(bf + printed, size - printed, "0x%#", bit); in strarray__scnprintf_flags()
41 static size_t pkey_alloc__scnprintf_access_rights(int access_rights, char *bf, size_t size, bool sh… in pkey_alloc__scnprintf_access_rights() argument
46 …return strarray__scnprintf_flags(&strarray__pkey_alloc_access_rights, bf, size, show_prefix, acces… in pkey_alloc__scnprintf_access_rights()
49 size_t syscall_arg__scnprintf_pkey_alloc_access_rights(char *bf, size_t size, struct syscall_arg *a… in syscall_arg__scnprintf_pkey_alloc_access_rights() argument
53 return pkey_alloc__scnprintf_access_rights(cmd, bf, size, arg->show_string_prefix); in syscall_arg__scnprintf_pkey_alloc_access_rights()
/tools/testing/selftests/breakpoints/
Dbreakpoint_test_arm64.c33 static void child(int size, int wr) in child() argument
50 if ((uintptr_t) addr % size) { in child()
57 switch (size) { in child()
81 static bool set_watchpoint(pid_t pid, int size, int wp) in set_watchpoint() argument
85 const unsigned int byte_mask = ((1 << size) - 1) << offset; in set_watchpoint()
204 int wr, wp, size; in main() local
214 for (size = 1; size <= 32; size = size*2) { in main()
215 for (wr = 0; wr <= 32; wr = wr + size) { in main()
216 for (wp = wr - size; wp <= wr + size; wp = wp + size) { in main()
217 result = run_test(size, MIN(size, 8), wr, wp); in main()
[all …]
/tools/testing/selftests/exec/
Dbinfmt_script43 def test(name, size, good=True, leading="", root="./", target="/perl", argument
52 remaining = size - len(hashbang) - len(leading) - len(root) - len(target) - len(arg)
111 test(name="too-big", size=SIZE+80, good=False)
113 test(name="exact", size=SIZE, good=False)
115 test(name="exact-space", size=SIZE, good=False, leading=" ")
117 test(name="whitespace-too-big", size=SIZE+71, good=False, root="",
120 test(name="truncated", size=SIZE+17, good=False, leading=" " * 19)
122 test(name="empty", size=2, good=False, root="",
125 test(name="spaces", size=SIZE-1, good=False, root="", fill=" ",
128 test(name="newline-prefix", size=SIZE-1, good=False, leading="\n",
[all …]
/tools/lib/
Dfind_bit.c68 unsigned long find_next_bit(const unsigned long *addr, unsigned long size, in find_next_bit() argument
71 return _find_next_bit(addr, NULL, size, offset, 0UL); in find_next_bit()
79 unsigned long find_first_bit(const unsigned long *addr, unsigned long size) in find_first_bit() argument
83 for (idx = 0; idx * BITS_PER_LONG < size; idx++) { in find_first_bit()
85 return min(idx * BITS_PER_LONG + __ffs(addr[idx]), size); in find_first_bit()
88 return size; in find_first_bit()
96 unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size) in find_first_zero_bit() argument
100 for (idx = 0; idx * BITS_PER_LONG < size; idx++) { in find_first_zero_bit()
102 return min(idx * BITS_PER_LONG + ffz(addr[idx]), size); in find_first_zero_bit()
105 return size; in find_first_zero_bit()
[all …]
Dvsprintf.c6 int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) in vscnprintf() argument
8 int i = vsnprintf(buf, size, fmt, args); in vscnprintf()
9 ssize_t ssize = size; in vscnprintf()
14 int scnprintf(char * buf, size_t size, const char * fmt, ...) in scnprintf() argument
16 ssize_t ssize = size; in scnprintf()
21 i = vsnprintf(buf, size, fmt, args); in scnprintf()
27 int scnprintf_pad(char * buf, size_t size, const char * fmt, ...) in scnprintf_pad() argument
29 ssize_t ssize = size; in scnprintf_pad()
34 i = vscnprintf(buf, size, fmt, args); in scnprintf_pad()
37 if (i < (int) size) { in scnprintf_pad()
[all …]
/tools/include/linux/
Dbitops.h36 #define for_each_set_bit(bit, addr, size) \ argument
37 for ((bit) = find_first_bit((addr), (size)); \
38 (bit) < (size); \
39 (bit) = find_next_bit((addr), (size), (bit) + 1))
41 #define for_each_clear_bit(bit, addr, size) \ argument
42 for ((bit) = find_first_zero_bit((addr), (size)); \
43 (bit) < (size); \
44 (bit) = find_next_zero_bit((addr), (size), (bit) + 1))
47 #define for_each_set_bit_from(bit, addr, size) \ argument
48 for ((bit) = find_next_bit((addr), (size), (bit)); \
[all …]
/tools/testing/selftests/drivers/net/mlxsw/spectrum/
Ddevlink_resources.sh45 local size
53 size=$(devlink_resource_get kvd "$i" | jq '.["size_min"]')
54 devlink_resource_size_set "$size" kvd "$i"
65 log_test "'$i' minimize [$size]"
72 local size
82 size=$(devlink_resource_size_get kvd)
87 size=$((size - min_size))
98 path "kvd/$i" size $((size + 128)) &> /dev/null
108 devlink_resource_size_set "$size" kvd "$i"
110 log_test "'$i' maximize [$size]"
/tools/testing/radix-tree/
Dbenchmark.c53 unsigned long size, unsigned long step) in benchmark_insert() argument
61 for (index = 0 ; index < size ; index += step) in benchmark_insert()
70 size, step, nsec); in benchmark_insert()
74 unsigned long size, unsigned long step) in benchmark_tagging() argument
82 for (index = 0 ; index < size ; index += step) in benchmark_tagging()
91 size, step, nsec); in benchmark_tagging()
95 unsigned long size, unsigned long step) in benchmark_delete() argument
103 for (index = 0 ; index < size ; index += step) in benchmark_delete()
112 size, step, nsec); in benchmark_delete()
115 static void benchmark_size(unsigned long size, unsigned long step) in benchmark_size() argument
[all …]
/tools/perf/bench/
Dmem-functions.c112 u64 (*do_cycles)(const struct function *r, size_t size, void *src, void *dst);
113 double (*do_gettimeofday)(const struct function *r, size_t size, void *src, void *dst);
118 static void __bench_mem_function(struct bench_mem_info *info, int r_idx, size_t size, double size_t… in __bench_mem_function() argument
123 void *src = NULL, *dst = zalloc(size); in __bench_mem_function()
131 src = zalloc(size); in __bench_mem_function()
140 result_cycles = info->do_cycles(r, size, src, dst); in __bench_mem_function()
142 result_bps = info->do_gettimeofday(r, size, src, dst); in __bench_mem_function()
179 size_t size; in bench_mem_common() local
192 size = (size_t)perf_atoll((char *)size_str); in bench_mem_common()
193 size_total = (double)size * nr_loops; in bench_mem_common()
[all …]
/tools/testing/selftests/arm64/mte/
Dmte_common_util.h45 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags);
46 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping,
48 void *mte_allocate_file_memory(size_t size, int mem_type, int mapping,
50 void *mte_allocate_file_memory_tag_range(size_t size, int mem_type, int mapping,
52 void mte_free_memory(void *ptr, size_t size, int mem_type, bool tags);
53 void mte_free_memory_tag_range(void *ptr, size_t size, int mem_type,
55 void *mte_insert_tags(void *ptr, size_t size);
56 void mte_clear_tags(void *ptr, size_t size);
84 static inline int check_allocated_memory(void *ptr, size_t size, in check_allocated_memory() argument
94 mte_free_memory((void *)ptr, size, mem_type, false); in check_allocated_memory()
[all …]

12345678910>>...20