Home
last modified time | relevance | path

Searched refs:buf_sz (Results 1 – 25 of 28) sorted by relevance

12

/tools/testing/selftests/bpf/progs/
A Dtest_urandom_usdt.c14 int BPF_USDT(urand_read_without_sema, int iter_num, int iter_cnt, int buf_sz) in BPF_USDT() argument
20 __sync_fetch_and_add(&urand_read_without_sema_buf_sz_sum, buf_sz); in BPF_USDT()
29 int BPF_USDT(urand_read_with_sema, int iter_num, int iter_cnt, int buf_sz) in BPF_USDT() argument
35 __sync_fetch_and_add(&urand_read_with_sema_buf_sz_sum, buf_sz); in BPF_USDT()
44 int BPF_USDT(urandlib_read_without_sema, int iter_num, int iter_cnt, int buf_sz) in BPF_USDT() argument
50 __sync_fetch_and_add(&urandlib_read_without_sema_buf_sz_sum, buf_sz); in BPF_USDT()
59 int BPF_USDT(urandlib_read_with_sema, int iter_num, int iter_cnt, int buf_sz) in BPF_USDT() argument
65 __sync_fetch_and_add(&urandlib_read_with_sema_buf_sz_sum, buf_sz); in BPF_USDT()
A Dbpf_iter_task_stack.c45 uint64_t buf_sz = 0; in get_task_user_stacks() local
59 buf_sz += res; in get_task_user_stacks()
66 bpf_seq_write(seq, &entries, buf_sz); in get_task_user_stacks()
/tools/testing/selftests/sparc64/drivers/
A Dadi-test.c193 update_stats(&read_stats, elapsed_time, buf_sz); in read_adi()
196 } while (bytes_read < buf_sz); in read_adi()
205 int buf_sz, unsigned long offset) in pread_adi() argument
221 update_stats(&pread_stats, elapsed_time, buf_sz); in pread_adi()
225 } while (bytes_read < buf_sz); in pread_adi()
249 update_stats(&write_stats, elapsed_time, buf_sz); in write_adi()
251 } while (bytes_written < buf_sz); in write_adi()
260 int buf_sz, unsigned long offset) in pwrite_adi() argument
271 buf_sz - bytes_written, cur_offset); in pwrite_adi()
284 } while (bytes_written < buf_sz); in pwrite_adi()
[all …]
/tools/perf/util/intel-pt-decoder/
A Dintel-pt-log.c29 size_t buf_sz; member
105 size_t space = b->buf_sz - b->head; in log_buf__write()
112 if (sz && b->head >= b->buf_sz) { in log_buf__write()
137 b->buf_sz = sz; in log_buf__open()
138 b->buf = malloc(b->buf_sz); in log_buf__open()
176 write_lines(b->buf + b->head, b->buf_sz - b->head, b->backend, &remove_first); in log_buf__dump()
/tools/testing/selftests/bpf/
A Ddisasm_helpers.c38 struct bpf_insn *disasm_insn(struct bpf_insn *insn, char *buf, size_t buf_sz) in disasm_insn() argument
42 .sz = buf_sz, in disasm_insn()
A Ddisasm_helpers.h10 struct bpf_insn *disasm_insn(struct bpf_insn *insn, char *buf, size_t buf_sz);
A Djit_disasm_helpers.c64 char *buf, __u32 buf_sz) in disasm_insn() argument
69 buf, buf_sz); in disasm_insn()
A Dveristat.c977 static int parse_verif_log(char * const buf, size_t buf_sz, struct verif_stats *s) in parse_verif_log() argument
983 buf[buf_sz - 1] = '\0'; in parse_verif_log()
1041 static int print_top_src_lines(char * const buf, size_t buf_sz, const char *prog_name) in print_top_src_lines() argument
1563 int buf_sz, log_level; in process_prog() local
1584 buf_sz = env.log_size ? env.log_size : max_verifier_log_size(); in process_prog()
1585 buf = malloc(buf_sz); in process_prog()
1595 buf_sz = sizeof(verif_log_buf); in process_prog()
1601 bpf_program__set_log_buf(prog, buf, buf_sz); in process_prog()
1636 parse_verif_log(buf, buf_sz, stats); in process_prog()
1644 print_top_src_lines(buf, buf_sz, stats->prog_name); in process_prog()
A Dtest_progs.c904 size_t buf_sz; member
921 &libbpf_output_capture.buf_sz); in start_libbpf_log_capture()
/tools/testing/selftests/net/tcp_ao/lib/
A Dsock.c647 static ssize_t test_client_loop(int sk, size_t buf_sz, const size_t msg_len, in test_client_loop() argument
656 buf = alloca(buf_sz); in test_client_loop()
659 randomize_buffer(buf, buf_sz); in test_client_loop()
664 for (i = 0; i < buf_sz; i += min(msg_len, buf_sz - i)) { in test_client_loop()
665 size_t sent, bytes = min(msg_len, buf_sz - i); in test_client_loop()
704 size_t buf_sz = msg_len * nr; in test_client_verify() local
707 ret = test_client_loop(sk, buf_sz, msg_len, NULL, 0, NULL); in test_client_verify()
710 return ret != buf_sz ? -1 : 0; in test_client_verify()
717 size_t buf_sz = msg_len * nr; in test_skpair_client() local
725 ret = test_client_loop(sk, buf_sz, msg_len, &c, cond, err); in test_skpair_client()
[all …]
/tools/testing/selftests/powerpc/nx-gzip/
A Dgunz_test.c172 static int nx_touch_pages_dde(struct nx_dde_t *ddep, long buf_sz, long page_sz, in nx_touch_pages_dde() argument
188 NXPRT(fprintf(stderr, "0x%lx\n", buf_sz)); in nx_touch_pages_dde()
198 if (buf_sz == 0) in nx_touch_pages_dde()
202 buf_sz), page_sz, wr); in nx_touch_pages_dde()
214 if (buf_sz == 0) in nx_touch_pages_dde()
215 buf_sz = getp32(ddep, ddebc); in nx_touch_pages_dde()
228 if (total > buf_sz) { in nx_touch_pages_dde()
229 buf_len = NX_MIN(buf_len, total - buf_sz); in nx_touch_pages_dde()
/tools/lib/bpf/
A Drelo_core.h97 int bpf_core_format_spec(char *buf, size_t buf_sz, const struct bpf_core_spec *spec);
A Drelo_core.c1172 int bpf_core_format_spec(char *buf, size_t buf_sz, const struct bpf_core_spec *spec) in bpf_core_format_spec() argument
1182 r = snprintf(buf, buf_sz, fmt, ##args); \ in bpf_core_format_spec()
1184 if (r >= buf_sz) \ in bpf_core_format_spec()
1185 r = buf_sz; \ in bpf_core_format_spec()
1187 buf_sz -= r; \ in bpf_core_format_spec()
A Dlibbpf.c2512 len = snprintf(buf, buf_sz, "%s/%s", path, name); in pathname_concat()
2515 if (len >= buf_sz) in pathname_concat()
7689 if (orig + patch_sz >= buf + buf_sz) { in patch_log()
7691 patch_sz -= (orig + patch_sz) - (buf + buf_sz) + 1; in patch_log()
7693 } else if (patch_sz - orig_sz > buf_sz - log_sz) { in patch_log()
7695 rem_sz -= (patch_sz - orig_sz) - (buf_sz - log_sz); in patch_log()
7706 char *buf, size_t buf_sz, size_t log_sz, in fixup_log_failed_core_relo() argument
7745 char *buf, size_t buf_sz, size_t log_sz, in fixup_log_missing_map_load() argument
7778 char *buf, size_t buf_sz, size_t log_sz, in fixup_log_missing_kfunc_call() argument
7835 fixup_log_failed_core_relo(prog, buf, buf_sz, log_sz, in fixup_verifier_log()
[all …]
A Dlinker.c562 int bpf_linker__add_buf(struct bpf_linker *linker, void *buf, size_t buf_sz, in bpf_linker__add_buf() argument
574 snprintf(filename, sizeof(filename), "mem:%p+%zu", buf, buf_sz); in bpf_linker__add_buf()
584 while (written < buf_sz) { in bpf_linker__add_buf()
585 ret = write(fd, buf, buf_sz); in bpf_linker__add_buf()
A Dbtf.c1443 __u32 buf_sz = 0, raw_size; in btf_load_into_kernel() local
1475 buf_sz = max((__u32)BPF_LOG_BUF_SIZE, buf_sz * 2); in btf_load_into_kernel()
1476 tmp = realloc(buf, buf_sz); in btf_load_into_kernel()
1486 opts.log_size = log_buf ? log_sz : buf_sz; in btf_load_into_kernel()
1504 if (!log_buf && errno == ENOSPC && buf_sz <= UINT_MAX / 2) in btf_load_into_kernel()
/tools/perf/util/
A Ddata.h101 int perf_data__make_kcore_dir(struct perf_data *data, char *buf, size_t buf_sz);
A Ddata.c466 int perf_data__make_kcore_dir(struct perf_data *data, char *buf, size_t buf_sz) in perf_data__make_kcore_dir() argument
473 ret = snprintf(buf, buf_sz, "%s/kcore_dir", data->path); in perf_data__make_kcore_dir()
474 if (ret < 0 || (size_t)ret >= buf_sz) in perf_data__make_kcore_dir()
A Dsession.h124 void *buf, size_t buf_sz,
A Dsymbol-elf.c347 struct rel_info *ri, char *buf, size_t buf_sz) in get_ifunc_name() argument
367 snprintf(buf, buf_sz, "%s@plt", sym->name); in get_ifunc_name()
536 char *buf, size_t buf_sz) in get_plt_got_name() argument
567 snprintf(buf, buf_sz, "%s@plt", sym_name); in get_plt_got_name()
578 char *buf, size_t buf_sz) in dso__synthesize_plt_got_symbols() argument
595 if (!get_plt_got_name(&shdr, i, &di, buf, buf_sz)) in dso__synthesize_plt_got_symbols()
596 snprintf(buf, buf_sz, "offset_%#" PRIx64 "@plt", (u64)shdr.sh_offset + i); in dso__synthesize_plt_got_symbols()
A Dsession.c1559 void *buf, size_t buf_sz, in perf_session__peek_event() argument
1579 if (buf_sz < hdr_sz) in perf_session__peek_event()
1591 if (event->header.size < hdr_sz || event->header.size > buf_sz) in perf_session__peek_event()
/tools/bpf/bpftool/
A Dgen.c93 static bool get_map_ident(const struct bpf_map *map, char *buf, size_t buf_sz) in get_map_ident() argument
100 snprintf(buf, buf_sz, "%s", name); in get_map_ident()
109 snprintf(buf, buf_sz, "%s", p + 1); in get_map_ident()
118 static bool get_datasec_ident(const char *sec_name, char *buf, size_t buf_sz) in get_datasec_ident() argument
126 snprintf(buf, buf_sz, "arena"); in get_datasec_ident()
133 snprintf(buf, buf_sz, "%s", sec_name + 1); in get_datasec_ident()
A Dcommon.c1198 int pathname_concat(char *buf, int buf_sz, const char *path, in pathname_concat() argument
1203 len = snprintf(buf, buf_sz, "%s/%s", path, name); in pathname_concat()
1206 if (len >= buf_sz) in pathname_concat()
A Dmain.h271 int pathname_concat(char *buf, int buf_sz, const char *path,
/tools/testing/selftests/bpf/prog_tests/
A Dreg_bounds.c40 size_t buf_sz; member
47 struct strbuf *name = (___##name.buf.buf_sz = (N), ___##name.buf.pos = 0, &___##name.buf)
56 s->pos < s->buf_sz ? s->buf_sz - s->pos : 0, in snappendf()

Completed in 108 milliseconds

12