Home
last modified time | relevance | path

Searched refs:sz (Results 1 – 25 of 161) sorted by relevance

1234567

/tools/lib/
A Dfind_bit.c29 unsigned long idx, val, sz = (size); \
31 for (idx = 0; idx * BITS_PER_LONG < sz; idx++) { \
34 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(val)), sz); \
39 sz; \
51 unsigned long mask, idx, tmp, sz = (size), __start = (start); \
53 if (unlikely(__start >= sz)) \
60 if ((idx + 1) * BITS_PER_LONG >= sz) \
65 sz = min(idx * BITS_PER_LONG + __ffs(MUNGE(tmp)), sz); \
67 sz; \
/tools/testing/selftests/bpf/prog_tests/
A Dglobal_data_init.c12 size_t sz; in test_global_data_init() local
23 sz = bpf_map__value_size(map); in test_global_data_init()
24 newval = malloc(sz); in test_global_data_init()
28 memset(newval, 0, sz); in test_global_data_init()
30 err = bpf_map__set_initial_value(map, newval, sz - 1); in test_global_data_init()
34 err = bpf_map__set_initial_value(map, newval, sz); in test_global_data_init()
46 buff = malloc(sz); in test_global_data_init()
49 if (CHECK(!buff || err || memcmp(buff, newval, sz), in test_global_data_init()
54 memset(newval, 1, sz); in test_global_data_init()
56 err = bpf_map__set_initial_value(map, newval, sz); in test_global_data_init()
A Dtest_veristat.c17 size_t sz; member
35 fix->sz = 1000000; in init_fixture()
36 fix->output = malloc(fix->sz); in init_fixture()
77 read(fix->fd, fix->output, fix->sz); in test_set_global_vars_succeeds()
119 read(fix->fd, fix->output, fix->sz); in test_set_global_vars_from_file_succeeds()
137 read(fix->fd, fix->output, fix->sz); in test_set_global_vars_out_of_range()
152 read(fix->fd, fix->output, fix->sz); in test_unsupported_ptr_array_type()
167 read(fix->fd, fix->output, fix->sz); in test_array_out_of_bounds()
182 read(fix->fd, fix->output, fix->sz); in test_array_index_not_found()
197 pread(fix->fd, fix->output, fix->sz, 0); in test_array_index_for_non_array()
[all …]
A Dtest_lsm.c25 long sz; in stack_mprotect() local
28 sz = sysconf(_SC_PAGESIZE); in stack_mprotect()
29 if (sz < 0) in stack_mprotect()
30 return sz; in stack_mprotect()
32 buf = alloca(sz * 3); in stack_mprotect()
33 ret = mprotect(GET_PAGE_ADDR(buf, sz), sz, in stack_mprotect()
/tools/perf/util/
A Dmem-events.c358 l += scnprintf(out, sz - l, "N/A"); in perf_mem__tlb_scnprintf()
423 l = scnprintf(out, sz, "N/A"); in perf_mem__op_scnprintf()
425 l = scnprintf(out, sz, "LOAD"); in perf_mem__op_scnprintf()
427 l = scnprintf(out, sz, "STORE"); in perf_mem__op_scnprintf()
429 l = scnprintf(out, sz, "PFETCH"); in perf_mem__op_scnprintf()
431 l = scnprintf(out, sz, "EXEC"); in perf_mem__op_scnprintf()
433 l = scnprintf(out, sz, "No"); in perf_mem__op_scnprintf()
571 l = scnprintf(out, sz, "N/A"); in perf_mem__lck_scnprintf()
573 l = scnprintf(out, sz, "Yes"); in perf_mem__lck_scnprintf()
575 l = scnprintf(out, sz, "No"); in perf_mem__lck_scnprintf()
[all …]
A Dpath.c24 char *mkpath(char *path_buf, size_t sz, const char *fmt, ...) in mkpath() argument
30 len = vsnprintf(path_buf, sz, fmt, args); in mkpath()
32 if (len >= sz) in mkpath()
33 strncpy(path_buf, "/bad-path/", sz); in mkpath()
A Daffinity.c15 int sz = cpu__max_cpu().cpu + 8 - 1; in get_cpu_set_size() local
20 if (sz < 4096) in get_cpu_set_size()
21 sz = 4096; in get_cpu_set_size()
22 return sz / 8; in get_cpu_set_size()
A Dmem-events.h44 int perf_mem__tlb_scnprintf(char *out, size_t sz, const struct mem_info *mem_info);
45 int perf_mem__lvl_scnprintf(char *out, size_t sz, const struct mem_info *mem_info);
46 int perf_mem__snp_scnprintf(char *out, size_t sz, const struct mem_info *mem_info);
47 int perf_mem__lck_scnprintf(char *out, size_t sz, const struct mem_info *mem_info);
48 int perf_mem__blk_scnprintf(char *out, size_t sz, const struct mem_info *mem_info);
A Dtime-utils.h38 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);
A Dthread-stack.h87 size_t sz, u64 ip, u64 kernel_start);
89 struct ip_callchain *chain, size_t sz, u64 ip,
92 struct branch_stack *dst, unsigned int sz);
94 struct branch_stack *dst, unsigned int sz,
/tools/testing/selftests/bpf/
A Dtest_btf.h17 #define BTF_TYPE_INT_ENC(name, encoding, bits_offset, bits, sz) \ argument
18 BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_INT, 0, 0), sz), \
30 #define BTF_STRUCT_ENC(name, nr_elems, sz) \ argument
31 BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_STRUCT, 0, nr_elems), sz)
33 #define BTF_UNION_ENC(name, nr_elems, sz) \ argument
34 BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_UNION, 0, nr_elems), sz)
72 #define BTF_TYPE_FLOAT_ENC(name, sz) \ argument
73 BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_FLOAT, 0, 0), sz)
A Dbpf_util.h30 static inline void bpf_strlcpy(char *dst, const char *src, size_t sz) in bpf_strlcpy() argument
34 if (sz == 0) in bpf_strlcpy()
37 sz--; in bpf_strlcpy()
38 for (i = 0; i < sz && src[i]; i++) in bpf_strlcpy()
/tools/lib/bpf/
A Dbpf.h41 size_t sz; /* size of this struct for forward/backward compatibility */ member
69 size_t sz; /* size of this struct for forward/backward compatibility */ member
129 size_t sz; /* size of this struct for forward/backward compatibility */ member
167 size_t sz; /* size of this struct for forward/backward compatibility */ member
306 size_t sz; /* size of this struct for forward/backward compatibility */ member
320 size_t sz; /* size of this struct for forward/backward compatibility */ member
340 size_t sz; /* size of this struct for forward/backward compatibility */ member
354 size_t sz; /* size of this struct for forward/backward compatibility */ member
397 size_t sz; /* size of this struct for forward/backward compatibility */ member
713 size_t sz; member
[all …]
A Dlibbpf.h117 size_t sz; member
497 size_t sz; member
534 size_t sz; member
557 size_t sz; member
584 size_t sz; member
637 size_t sz; member
683 size_t sz; member
748 size_t sz; member
779 size_t sz; member
812 size_t sz; member
[all …]
/tools/testing/selftests/bpf/benchs/
A Dbench_strncmp.c63 size_t i, sz; in strncmp_setup() local
65 sz = sizeof(ctx.skel->rodata->target); in strncmp_setup()
66 if (!sz || sz < sizeof(ctx.skel->bss->str)) { in strncmp_setup()
68 sz, sizeof(ctx.skel->bss->str)); in strncmp_setup()
82 for (i = 0; i < sz - 1; i++) in strncmp_setup()
84 target[sz - 1] = '\0'; in strncmp_setup()
A Dbench_bpf_crypto.c82 size_t i, sz; in crypto_setup() local
84 sz = args.crypto_len; in crypto_setup()
85 if (!sz || sz > sizeof(ctx.skel->bss->dst)) { in crypto_setup()
87 sz, sizeof(ctx.skel->bss->dst)); in crypto_setup()
105 input = malloc(sz); in crypto_setup()
106 for (i = 0; i < sz - 1; i++) in crypto_setup()
108 input[sz - 1] = '\0'; in crypto_setup()
/tools/lib/subcmd/
A Dexec-cmd.c39 static const char *get_pwd_cwd(char *buf, size_t sz) in get_pwd_cwd() argument
43 if (getcwd(buf, sz) == NULL) in get_pwd_cwd()
51 strlcpy(buf, pwd, sz); in get_pwd_cwd()
57 static const char *make_nonrelative_path(char *buf, size_t sz, const char *path) in make_nonrelative_path() argument
60 if (strlcpy(buf, path, sz) >= sz) in make_nonrelative_path()
63 const char *cwd = get_pwd_cwd(buf, sz); in make_nonrelative_path()
68 if (strlen(cwd) + strlen(path) + 2 >= sz) in make_nonrelative_path()
/tools/perf/arch/arm64/util/
A Dheader.c17 static int _get_cpuid(char *buf, size_t sz, struct perf_cpu cpu) in _get_cpuid() argument
24 if (!sysfs || sz < MIDR_SIZE) in _get_cpuid()
44 int get_cpuid(char *buf, size_t sz, struct perf_cpu cpu) in get_cpuid() argument
50 return _get_cpuid(buf, sz, cpu); in get_cpuid()
57 int ret = _get_cpuid(buf, sz, cpu); in get_cpuid()
/tools/testing/selftests/acct/
A Dacct_syscall.c19 int sz; in main() local
61 sz = ftell(fp); in main()
65 if (sz <= 0) { in main()
/tools/testing/selftests/net/
A Dreuseport_addr_any.c35 int opt, i, sz; in build_rcv_fd() local
47 sz = sizeof(addr4); in build_rcv_fd()
57 sz = sizeof(addr6); in build_rcv_fd()
79 if (bind(rcv_fds[i], addr, sz)) in build_rcv_fd()
94 int fd, sz; in connect_and_send() local
107 sz = sizeof(saddr4); in connect_and_send()
120 sz = sizeof(saddr6); in connect_and_send()
137 if (bind(fd, saddr, sz)) in connect_and_send()
140 if (connect(fd, daddr, sz)) in connect_and_send()
/tools/testing/selftests/bpf/progs/
A Dringbuf_bench.c25 long sz; in get_flags() local
30 sz = bpf_ringbuf_query(&ringbuf, BPF_RB_AVAIL_DATA); in get_flags()
31 return sz >= wakeup_data_size ? BPF_RB_FORCE_WAKEUP : BPF_RB_NO_WAKEUP; in get_flags()
/tools/perf/util/intel-pt-decoder/
A Dintel-pt-log.c99 size_t sz = size; in log_buf__write() local
104 while (sz) { in log_buf__write()
106 size_t n = min(space, sz); in log_buf__write()
109 sz -= n; in log_buf__write()
112 if (sz && b->head >= b->buf_sz) { in log_buf__write()
128 static FILE *log_buf__open(struct log_buf *b, FILE *backend, unsigned int sz) in log_buf__open() argument
137 b->buf_sz = sz; in log_buf__open()
/tools/perf/arch/x86/util/
A Dheader.c26 __get_cpuid(char *buffer, size_t sz, const char *fmt) in __get_cpuid() argument
50 nb = scnprintf(buffer, sz, fmt, vendor, family, model, step); in __get_cpuid()
61 get_cpuid(char *buffer, size_t sz, struct perf_cpu cpu __maybe_unused) in get_cpuid() argument
63 return __get_cpuid(buffer, sz, "%s,%u,%u,%u$"); in get_cpuid()
/tools/include/linux/
A Dhashtable.h31 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/loongarch/util/
A Dheader.c73 int get_cpuid(char *buffer, size_t sz, struct perf_cpu cpu __maybe_unused) in get_cpuid() argument
81 if (sz < strlen(cpuid)) { in get_cpuid()
86 scnprintf(buffer, sz, "%s", cpuid); in get_cpuid()

Completed in 38 milliseconds

1234567