Home
last modified time | relevance | path

Searched refs:log_buf (Results 1 – 25 of 63) sorted by relevance

123

/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Dlog_fixup.c16 char log_buf[8 * 1024]; in bad_core_relo() local
25 memset(log_buf, 0, sizeof(log_buf)); in bad_core_relo()
26 bpf_program__set_log_buf(skel->progs.bad_relo, log_buf, log_buf_size ?: sizeof(log_buf)); in bad_core_relo()
33 ASSERT_HAS_SUBSTR(log_buf, in bad_core_relo()
40 ASSERT_HAS_SUBSTR(log_buf, in bad_core_relo()
43 ASSERT_HAS_SUBSTR(log_buf, in bad_core_relo()
49 ASSERT_HAS_SUBSTR(log_buf, in bad_core_relo()
53 ASSERT_NULL(strstr(log_buf, "max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0\n"), in bad_core_relo()
58 ASSERT_NULL(strstr(log_buf, "struct task_struct___bad.fake_field (0:1 @ offset 4)\n"), in bad_core_relo()
61 ASSERT_NULL(strstr(log_buf, "max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0\n"), in bad_core_relo()
[all …]
Dlog_buf.c153 char *log_buf; in bpf_prog_load_log_buf() local
156 log_buf = malloc(log_buf_sz); in bpf_prog_load_log_buf()
157 if (!ASSERT_OK_PTR(log_buf, "log_buf_alloc")) in bpf_prog_load_log_buf()
159 opts.log_buf = log_buf; in bpf_prog_load_log_buf()
163 log_buf[0] = '\0'; in bpf_prog_load_log_buf()
167 ASSERT_STREQ(log_buf, "", "good_log_0"); in bpf_prog_load_log_buf()
174 log_buf[0] = '\0'; in bpf_prog_load_log_buf()
178 ASSERT_OK_PTR(strstr(log_buf, "0: R1=ctx(off=0,imm=0) R10=fp0"), "good_log_2"); in bpf_prog_load_log_buf()
185 log_buf[0] = '\0'; in bpf_prog_load_log_buf()
189 ASSERT_OK_PTR(strstr(log_buf, "R0 !read_ok"), "bad_log_0"); in bpf_prog_load_log_buf()
[all …]
Dverifier_log.c77 opts.log_buf = logs.reference; in verif_log_subtest()
100 opts.log_buf = logs.buf; in verif_log_subtest()
120 opts.log_buf = logs.buf; in verif_log_subtest()
178 opts.log_buf = logs.buf; in verif_log_subtest()
189 opts.log_buf = NULL; in verif_log_subtest()
198 opts.log_buf = logs.buf; in verif_log_subtest()
209 opts.log_buf = NULL; in verif_log_subtest()
218 opts.log_buf = logs.buf; in verif_log_subtest()
226 opts.log_buf = logs.buf; in verif_log_subtest()
234 opts.log_buf = logs.buf; in verif_log_subtest()
[all …]
Dcb_refs.c8 static char log_buf[1024 * 1024]; variable
22 LIBBPF_OPTS(bpf_object_open_opts, opts, .kernel_log_buf = log_buf, in test_cb_refs()
23 .kernel_log_size = sizeof(log_buf), in test_cb_refs()
42 if (!ASSERT_OK_PTR(strstr(log_buf, cb_refs_tests[i].err_msg), "expected error message")) { in test_cb_refs()
44 fprintf(stderr, "Verifier: %s\n", log_buf); in test_cb_refs()
Dspin_lock.c9 static char log_buf[1024 * 1024]; variable
73 LIBBPF_OPTS(bpf_object_open_opts, opts, .kernel_log_buf = log_buf, in test_spin_lock_fail_prog()
74 .kernel_log_size = sizeof(log_buf), in test_spin_lock_fail_prog()
95 if (strstr(log_buf, "JIT does not support calling kernel function")) { in test_spin_lock_fail_prog()
100 ret = match_regex(err_msg, log_buf); in test_spin_lock_fail_prog()
106 fprintf(stderr, "Verifier: %s\n", log_buf); in test_spin_lock_fail_prog()
Dbpf_nf.c8 static char log_buf[1024 * 1024]; variable
140 LIBBPF_OPTS(bpf_object_open_opts, opts, .kernel_log_buf = log_buf, in test_bpf_nf_ct_fail()
141 .kernel_log_size = sizeof(log_buf), in test_bpf_nf_ct_fail()
161 if (!ASSERT_OK_PTR(strstr(log_buf, err_msg), "expected error message")) { in test_bpf_nf_ct_fail()
163 fprintf(stderr, "Verifier: %s\n", log_buf); in test_bpf_nf_ct_fail()
Dsyscall.c7 __u64 log_buf; member
20 .log_buf = (uintptr_t) verifier_log, in test_syscall()
Draw_tp_writable_test_run.c22 .log_buf = error, in serial_test_raw_tp_writable_test_run()
39 .log_buf = error, in serial_test_raw_tp_writable_test_run()
Dbpf_tcp_ca.c224 const char *prog_name, *log_buf; in libbpf_debug_print() local
233 log_buf = va_arg(args, char *); in libbpf_debug_print()
234 if (!log_buf) in libbpf_debug_print()
236 if (err_str && strstr(log_buf, err_str) != NULL) in libbpf_debug_print()
239 printf(format, prog_name, log_buf); in libbpf_debug_print()
Draw_tp_writable_reject_nbd_invalid.c23 .log_buf = error, in test_raw_tp_writable_reject_nbd_invalid()
Dlinked_list.c11 static char log_buf[1024 * 1024]; variable
103 LIBBPF_OPTS(bpf_object_open_opts, opts, .kernel_log_buf = log_buf, in test_linked_list_fail_prog()
104 .kernel_log_size = sizeof(log_buf), in test_linked_list_fail_prog()
124 if (!ASSERT_OK_PTR(strstr(log_buf, err_msg), "expected error message")) { in test_linked_list_fail_prog()
126 fprintf(stderr, "Verifier: %s\n", log_buf); in test_linked_list_fail_prog()
/linux-6.6.21/tools/perf/util/intel-pt-decoder/
Dintel-pt-log.c27 struct log_buf { struct
40 static struct log_buf log_buf; argument
98 struct log_buf *b = cookie; in log_buf__write()
122 struct log_buf *b = cookie; in log_buf__close()
128 static FILE *log_buf__open(struct log_buf *b, FILE *backend, unsigned int sz) in log_buf__open()
165 static void log_buf__dump(struct log_buf *b) in log_buf__dump()
187 log_buf__dump(&log_buf); in intel_pt_log_dump_buf()
203 f = log_buf__open(&log_buf, f, intel_pt_log_on_error_size); in intel_pt_log_open()
/linux-6.6.21/tools/testing/selftests/bpf/
Dtest_progs.c27 static void stdio_hijack_init(char **log_buf, size_t *log_cnt) in stdio_hijack_init() argument
38 stdout = open_memstream(log_buf, log_cnt); in stdio_hijack_init()
54 static void stdio_hijack(char **log_buf, size_t *log_cnt) in stdio_hijack() argument
65 stdio_hijack_init(log_buf, log_cnt); in stdio_hijack()
246 static void print_test_log(char *log_buf, size_t log_cnt) in print_test_log() argument
248 log_buf[log_cnt] = '\0'; in print_test_log()
249 fprintf(env.stdout, "%s", log_buf); in print_test_log()
250 if (log_buf[log_cnt - 1] != '\n') in print_test_log()
272 static void jsonw_write_log_message(json_writer_t *w, char *log_buf, size_t log_cnt) in jsonw_write_log_message() argument
278 jsonw_string_field(w, "message", log_buf); in jsonw_write_log_message()
[all …]
Dtest_loader.c70 if (!tester->log_buf) { in tester_init()
72 tester->log_buf = malloc(tester->log_buf_sz); in tester_init()
73 if (!ASSERT_OK_PTR(tester->log_buf, "tester_log_buf")) in tester_init()
85 free(tester->log_buf); in test_loader_fini()
353 bpf_program__set_log_buf(prog, tester->log_buf, tester->log_buf_sz); in prepare_case()
367 tester->log_buf[0] = '\0'; in prepare_case()
371 static void emit_verifier_log(const char *log_buf, bool force) in emit_verifier_log() argument
375 fprintf(stdout, "VERIFIER LOG:\n=============\n%s=============\n", log_buf); in emit_verifier_log()
392 match = strstr(tester->log_buf + tester->next_match_pos, expect_msg); in validate_case()
396 emit_verifier_log(tester->log_buf, true /*force*/); in validate_case()
[all …]
Dtest_progs.h73 char *log_buf; member
93 char *log_buf; member
156 char log_buf[MAX_LOG_TRUNK_SIZE + 1]; member
431 char *log_buf; member
Dtesting_helpers.c297 __u32 kern_version, char *log_buf, in bpf_test_load_program() argument
304 .log_buf = log_buf, in bpf_test_load_program()
/linux-6.6.21/tools/power/acpi/tools/pfrut/
Dpfrut.c204 char *log_buf; in main() local
409 log_buf = malloc(max_data_sz + 1); in main()
410 if (!log_buf) { in main()
425 memcpy(log_buf, p_mmap, max_data_sz); in main()
426 log_buf[max_data_sz] = '\0'; in main()
427 printf("%s\n", log_buf); in main()
428 free(log_buf); in main()
/linux-6.6.21/tools/lib/bpf/
Dlibbpf_probes.c105 char *log_buf, size_t log_buf_sz) in probe_prog_load() argument
108 .log_buf = log_buf, in probe_prog_load()
110 .log_level = log_buf ? 1 : 0, in probe_prog_load()
134 opts.log_buf = buf; in probe_prog_load()
147 opts.log_buf = buf; in probe_prog_load()
Dbpf.c242 char *log_buf; in bpf_prog_load() local
287 log_buf = OPTS_GET(opts, log_buf, NULL); in bpf_prog_load()
291 if (!!log_buf != !!log_size) in bpf_prog_load()
309 attr.log_buf = ptr_to_u64(log_buf); in bpf_prog_load()
361 if (log_level == 0 && log_buf) { in bpf_prog_load()
366 attr.log_buf = ptr_to_u64(log_buf); in bpf_prog_load()
1171 char *log_buf; in bpf_btf_load() local
1183 log_buf = OPTS_GET(opts, log_buf, NULL); in bpf_btf_load()
1189 if (log_size && !log_buf) in bpf_btf_load()
1200 attr.btf_log_buf = ptr_to_u64(log_buf); in bpf_btf_load()
[all …]
Dskel_internal.h57 __u64 log_buf; member
339 attr.log_buf = opts->ctx->log_buf; in bpf_load_and_run()
/linux-6.6.21/samples/bpf/
Dcookie_uid_helper_example.c78 static char log_buf[1 << 16]; in prog_load() local
161 .log_buf = log_buf, in prog_load()
162 .log_size = sizeof(log_buf), in prog_load()
168 error(1, errno, "failed to load prog\n%s\n", log_buf); in prog_load()
/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dsyscall.c13 __u64 log_buf; member
99 prog_load_attr.log_buf = ctx->log_buf; in bpf_prog()
/linux-6.6.21/tools/testing/selftests/net/
Dpsock_fanout.c146 static char log_buf[65536]; in sock_fanout_set_ebpf() local
168 attr.log_buf = (unsigned long) log_buf, in sock_fanout_set_ebpf()
169 attr.log_size = sizeof(log_buf), in sock_fanout_set_ebpf()
175 fprintf(stderr, "bpf verifier:\n%s\n", log_buf); in sock_fanout_set_ebpf()
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/
Damdgpu_vcn.c1071 void *log_buf; in amdgpu_debugfs_vcn_fwlog_read() local
1083 log_buf = vcn->fw_shared.cpu_addr + vcn->fw_shared.mem_size; in amdgpu_debugfs_vcn_fwlog_read()
1085 plog = (volatile struct amdgpu_vcn_fwlog *)log_buf; in amdgpu_debugfs_vcn_fwlog_read()
1114 (log_buf + read_pos), read_num[i])) in amdgpu_debugfs_vcn_fwlog_read()
1155 volatile struct amdgpu_vcn_fwlog *log_buf = fw_log_cpu_addr; in amdgpu_vcn_fwlog_init() local
1164 log_buf->header_size = sizeof(struct amdgpu_vcn_fwlog); in amdgpu_vcn_fwlog_init()
1165 log_buf->buffer_size = AMDGPU_VCNFW_LOG_SIZE; in amdgpu_vcn_fwlog_init()
1166 log_buf->rptr = log_buf->header_size; in amdgpu_vcn_fwlog_init()
1167 log_buf->wptr = log_buf->header_size; in amdgpu_vcn_fwlog_init()
1168 log_buf->wrapped = 0; in amdgpu_vcn_fwlog_init()
/linux-6.6.21/tools/build/feature/
Dtest-bpf.c37 attr.log_buf = 0; in main()

123