/tools/perf/util/ |
D | record.c | 92 void perf_evlist__config(struct evlist *evlist, struct record_opts *opts, in perf_evlist__config() argument 98 bool sample_id = opts->sample_id; in perf_evlist__config() 104 if (opts->group) in perf_evlist__config() 108 opts->no_inherit = true; in perf_evlist__config() 113 evsel__config(evsel, opts, callchain); in perf_evlist__config() 122 if (opts->full_auxtrace) { in perf_evlist__config() 155 static int record_opts__config_freq(struct record_opts *opts) in record_opts__config_freq() argument 157 bool user_freq = opts->user_freq != UINT_MAX; in record_opts__config_freq() 160 if (opts->user_interval != ULLONG_MAX) in record_opts__config_freq() 161 opts->default_interval = opts->user_interval; in record_opts__config_freq() [all …]
|
D | clockid.c | 70 struct record_opts *opts = (struct record_opts *)opt->value; in parse_clockid() local 75 opts->use_clockid = 0; in parse_clockid() 84 if (opts->use_clockid) in parse_clockid() 87 opts->use_clockid = true; in parse_clockid() 90 if (sscanf(str, "%d", &opts->clockid) == 1) in parse_clockid() 91 return get_clockid_res(opts->clockid, &opts->clockid_res_ns); in parse_clockid() 99 opts->clockid = cm->clockid; in parse_clockid() 100 return get_clockid_res(opts->clockid, in parse_clockid() 101 &opts->clockid_res_ns); in parse_clockid() 105 opts->use_clockid = false; in parse_clockid()
|
D | parse-sublevel-options.c | 10 struct sublevel_option *opts) in parse_one_sublevel_option() argument 12 struct sublevel_option *opt = opts; in parse_one_sublevel_option() 46 int perf_parse_sublevel_options(const char *str, struct sublevel_option *opts) in perf_parse_sublevel_options() argument 59 ret = parse_one_sublevel_option(p, opts); in perf_parse_sublevel_options()
|
/tools/perf/arch/x86/util/ |
D | intel-bts.c | 107 struct record_opts *opts) in intel_bts_recording_options() argument 116 if (opts->auxtrace_sample_mode) { in intel_bts_recording_options() 122 btsr->snapshot_mode = opts->auxtrace_snapshot_mode; in intel_bts_recording_options() 133 opts->full_auxtrace = true; in intel_bts_recording_options() 137 if (opts->auxtrace_snapshot_mode && !opts->full_auxtrace) { in intel_bts_recording_options() 142 if (!opts->full_auxtrace) in intel_bts_recording_options() 145 if (opts->full_auxtrace && !perf_cpu_map__empty(cpus)) { in intel_bts_recording_options() 151 if (opts->auxtrace_snapshot_mode) { in intel_bts_recording_options() 152 if (!opts->auxtrace_snapshot_size && !opts->auxtrace_mmap_pages) { in intel_bts_recording_options() 154 opts->auxtrace_mmap_pages = MiB(4) / page_size; in intel_bts_recording_options() [all …]
|
D | intel-pt.c | 242 struct record_opts *opts, in intel_pt_parse_snapshot_options() argument 256 opts->auxtrace_snapshot_mode = true; in intel_pt_parse_snapshot_options() 257 opts->auxtrace_snapshot_size = snapshot_size; in intel_pt_parse_snapshot_options() 621 struct record_opts *opts) in intel_pt_recording_options() argument 634 ptr->snapshot_mode = opts->auxtrace_snapshot_mode; in intel_pt_recording_options() 646 opts->full_auxtrace = true; in intel_pt_recording_options() 650 if (opts->auxtrace_snapshot_mode && !opts->full_auxtrace) { in intel_pt_recording_options() 655 if (opts->auxtrace_snapshot_mode && opts->auxtrace_sample_mode) { in intel_pt_recording_options() 660 if (opts->use_clockid) { in intel_pt_recording_options() 668 if (!opts->full_auxtrace) in intel_pt_recording_options() [all …]
|
/tools/perf/ |
D | builtin-record.c | 90 struct record_opts opts; member 407 struct record_opts *opts = (struct record_opts *)opt->value; in record__aio_parse() local 410 opts->nr_cblocks = 0; in record__aio_parse() 413 opts->nr_cblocks = strtol(str, NULL, 0); in record__aio_parse() 414 if (!opts->nr_cblocks) in record__aio_parse() 415 opts->nr_cblocks = nr_cblocks_default; in record__aio_parse() 445 return rec->opts.nr_cblocks > 0; in record__aio_enabled() 454 struct record_opts *opts = (struct record_opts *)opt->value; in record__mmap_flush_parse() local 467 opts->mmap_flush = parse_tag_value(str, tags); in record__mmap_flush_parse() 468 if (opts->mmap_flush == (int)-1) in record__mmap_flush_parse() [all …]
|
D | builtin-data.c | 59 struct perf_data_convert_opts opts = { in cmd_data_convert() local 68 OPT_BOOLEAN(0, "tod", &opts.tod, "Convert time to wall clock time"), in cmd_data_convert() 70 OPT_BOOLEAN('f', "force", &opts.force, "don't complain, do it"), in cmd_data_convert() 71 OPT_BOOLEAN(0, "all", &opts.all, "Convert all events"), in cmd_data_convert() 89 return bt_convert__perf2ctf(input_name, to_ctf, &opts); in cmd_data_convert()
|
/tools/testing/selftests/netfilter/ |
D | nf-queue.c | 29 static struct options opts; variable 90 if (opts.verbose > 0) in queue_cb() 99 if (opts.verbose > 0) { in queue_cb() 113 if (opts.count_packets) in queue_cb() 227 queue_num = opts.queue_num; in open_queue() 237 flags = opts.gso_enabled ? NFQA_CFG_F_GSO : 0; in open_queue() 248 tv.tv_sec = opts.timeout; in open_queue() 249 if (opts.timeout && setsockopt(mnl_socket_get_fd(nl), in open_queue() 313 if (opts.delay_ms) in mainloop() 314 sleep_ms(opts.delay_ms); in mainloop() [all …]
|
/tools/testing/vsock/ |
D | vsock_test.c | 22 static void test_stream_connection_reset(const struct test_opts *opts) in test_stream_connection_reset() argument 31 .svm_cid = opts->peer_cid, in test_stream_connection_reset() 58 static void test_stream_bind_only_client(const struct test_opts *opts) in test_stream_bind_only_client() argument 67 .svm_cid = opts->peer_cid, in test_stream_bind_only_client() 100 static void test_stream_bind_only_server(const struct test_opts *opts) in test_stream_bind_only_server() argument 130 static void test_stream_client_close_client(const struct test_opts *opts) in test_stream_client_close_client() argument 134 fd = vsock_stream_connect(opts->peer_cid, 1234); in test_stream_client_close_client() 144 static void test_stream_client_close_server(const struct test_opts *opts) in test_stream_client_close_server() argument 165 static void test_stream_server_close_client(const struct test_opts *opts) in test_stream_server_close_client() argument 169 fd = vsock_stream_connect(opts->peer_cid, 1234); in test_stream_server_close_client() [all …]
|
D | vsock_diag_test.c | 328 static void test_no_sockets(const struct test_opts *opts) in test_no_sockets() argument 339 static void test_listen_socket_server(const struct test_opts *opts) in test_listen_socket_server() argument 377 static void test_connect_client(const struct test_opts *opts) in test_connect_client() argument 383 fd = vsock_stream_connect(opts->peer_cid, 1234); in test_connect_client() 402 static void test_connect_server(const struct test_opts *opts) in test_connect_server() argument 519 struct test_opts opts = { in main() local 538 opts.mode = TEST_MODE_CLIENT; in main() 540 opts.mode = TEST_MODE_SERVER; in main() 547 opts.peer_cid = parse_cid(optarg); in main() 567 if (opts.mode == TEST_MODE_UNSET) in main() [all …]
|
D | util.h | 28 void (*run_client)(const struct test_opts *opts); 31 void (*run_server)(const struct test_opts *opts); 45 const struct test_opts *opts);
|
/tools/testing/selftests/bpf/prog_tests/ |
D | pe_preserve_elems.c | 13 DECLARE_LIBBPF_OPTS(bpf_test_run_opts, opts); in test_one_map() 30 err = bpf_prog_test_run_opts(bpf_program__fd(prog), &opts); in test_one_map() 33 if (CHECK(opts.retval != 0, "bpf_perf_event_read_value", in test_one_map() 34 "failed with %d\n", opts.retval)) in test_one_map() 40 err = bpf_prog_test_run_opts(bpf_program__fd(prog), &opts); in test_one_map() 45 CHECK(opts.retval != 0, "bpf_perf_event_read_value", in test_one_map() 46 "failed with %d\n", opts.retval); in test_one_map() 48 CHECK(opts.retval != -ENOENT, "bpf_perf_event_read_value", in test_one_map() 50 opts.retval); in test_one_map()
|
D | raw_tp_test_run.c | 19 DECLARE_LIBBPF_OPTS(bpf_test_run_opts, opts, in test_raw_tp_test_run() 66 opts.cpu = i; in test_raw_tp_test_run() 67 opts.retval = 0; in test_raw_tp_test_run() 68 err = bpf_prog_test_run_opts(prog_fd, &opts); in test_raw_tp_test_run() 72 CHECK(opts.retval != expected_retval, in test_raw_tp_test_run() 74 expected_retval, opts.retval); in test_raw_tp_test_run() 78 opts.cpu = 0xffffffff; in test_raw_tp_test_run() 79 err = bpf_prog_test_run_opts(prog_fd, &opts); in test_raw_tp_test_run() 85 opts.cpu = 1; in test_raw_tp_test_run() 86 opts.flags = 0; in test_raw_tp_test_run() [all …]
|
D | xdp_attach.c | 14 DECLARE_LIBBPF_OPTS(bpf_xdp_set_link_opts, opts, in test_xdp_attach() 42 &opts); in test_xdp_attach() 52 &opts); in test_xdp_attach() 56 opts.old_fd = fd1; in test_xdp_attach() 57 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, fd2, 0, &opts); in test_xdp_attach() 65 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, fd3, 0, &opts); in test_xdp_attach() 69 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, -1, 0, &opts); in test_xdp_attach() 73 opts.old_fd = fd2; in test_xdp_attach() 74 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, -1, 0, &opts); in test_xdp_attach()
|
D | xdp_link.c | 12 DECLARE_LIBBPF_OPTS(bpf_xdp_set_link_opts, opts, .old_fd = -1); in test_xdp_link() 43 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, prog_fd1, XDP_FLAGS_REPLACE, &opts); in test_xdp_link() 57 opts.old_fd = prog_fd1; in test_xdp_link() 58 bpf_set_link_xdp_fd_opts(IFINDEX_LO, -1, XDP_FLAGS_REPLACE, &opts); in test_xdp_link() 63 opts.old_fd = prog_fd1; in test_xdp_link() 64 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, -1, XDP_FLAGS_REPLACE, &opts); in test_xdp_link() 81 opts.old_fd = prog_fd1; in test_xdp_link() 82 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, prog_fd2, XDP_FLAGS_REPLACE, &opts); in test_xdp_link()
|
D | btf_dump.c | 16 struct btf_dump_opts opts; member 28 const struct btf_dump_opts *opts) in btf_dump_all_types() argument 34 d = btf_dump__new(btf, NULL, opts, btf_dump_printf); in btf_dump_all_types() 91 t->opts.ctx = f; in test_btf_dump_case() 92 err = btf_dump_all_types(btf, &t->opts); in test_btf_dump_case() 140 struct btf_dump_opts opts; in test_btf_dump_incremental() local 149 opts.ctx = dump_buf_file; in test_btf_dump_incremental() 150 d = btf_dump__new(btf, NULL, &opts, btf_dump_printf); in test_btf_dump_incremental()
|
/tools/testing/selftests/net/ |
D | reuseaddr_ports_exhausted.c | 83 struct reuse_opts *opts; in TEST() local 87 opts = &unreusable_opts[i]; in TEST() 90 fd[j] = bind_port(_metadata, opts->reuseaddr[j], opts->reuseport[j]); in TEST() 103 struct reuse_opts *opts; in TEST() local 107 opts = &reusable_opts[i]; in TEST() 110 fd[j] = bind_port(_metadata, opts->reuseaddr[j], opts->reuseport[j]); in TEST() 114 if (opts->reuseport[0] && opts->reuseport[1]) { in TEST() 128 struct reuse_opts *opts; in TEST() local 133 opts = &reusable_opts[i]; in TEST() 139 fd[j] = bind_port(_metadata, opts->reuseaddr[j], opts->reuseport[j]); in TEST()
|
/tools/lib/subcmd/ |
D | parse-options.c | 696 static void print_option_help(const struct option *opts, int full) in print_option_help() argument 701 if (opts->type == OPTION_GROUP) { in print_option_help() 703 if (*opts->help) in print_option_help() 704 fprintf(stderr, "%s\n", opts->help); in print_option_help() 707 if (!full && (opts->flags & PARSE_OPT_HIDDEN)) in print_option_help() 709 if (opts->flags & PARSE_OPT_DISABLED) in print_option_help() 713 if (opts->short_name) in print_option_help() 714 pos += fprintf(stderr, "-%c", opts->short_name); in print_option_help() 718 if (opts->long_name && opts->short_name) in print_option_help() 720 if (opts->long_name) in print_option_help() [all …]
|
/tools/perf/scripts/python/ |
D | stackcollapse.py | 58 (opts, args) = parser.parse_args() 62 if opts.include_tid and not opts.include_comm: 64 if opts.include_pid and not opts.include_comm: 77 if opts.tidy_java: 92 if opts.annotate_kernel and dso == '[kernel.kallsyms]': 111 if opts.include_comm: 114 if opts.include_pid: 117 if opts.include_tid:
|
/tools/perf/arch/arm/util/ |
D | cs-etm.c | 194 struct record_opts *opts, in cs_etm_parse_snapshot_options() argument 208 opts->auxtrace_snapshot_mode = true; in cs_etm_parse_snapshot_options() 209 opts->auxtrace_snapshot_size = snapshot_size; in cs_etm_parse_snapshot_options() 254 struct record_opts *opts) in cs_etm_recording_options() argument 266 ptr->snapshot_mode = opts->auxtrace_snapshot_mode; in cs_etm_recording_options() 268 if (!record_opts__no_switch_events(opts) && in cs_etm_recording_options() 270 opts->record_switch_events = true; in cs_etm_recording_options() 282 opts->full_auxtrace = true; in cs_etm_recording_options() 294 if (opts->use_clockid) { in cs_etm_recording_options() 301 if (opts->auxtrace_snapshot_mode) { in cs_etm_recording_options() [all …]
|
/tools/lib/bpf/ |
D | libbpf_internal.h | 112 static inline bool libbpf_validate_opts(const char *opts, in libbpf_validate_opts() argument 124 if (opts[i]) { in libbpf_validate_opts() 134 #define OPTS_VALID(opts, type) \ argument 135 (!(opts) || libbpf_validate_opts((const char *)opts, \ 138 (opts)->sz, #type)) 139 #define OPTS_HAS(opts, field) \ argument 140 ((opts) && opts->sz >= offsetofend(typeof(*(opts)), field)) 141 #define OPTS_GET(opts, field, fallback_value) \ argument 142 (OPTS_HAS(opts, field) ? (opts)->field : fallback_value) 143 #define OPTS_SET(opts, field, value) \ argument [all …]
|
D | bpf.c | 457 const struct bpf_map_batch_opts *opts) in bpf_map_batch_common() argument 462 if (!OPTS_VALID(opts, bpf_map_batch_opts)) in bpf_map_batch_common() 472 attr.batch.elem_flags = OPTS_GET(opts, elem_flags, 0); in bpf_map_batch_common() 473 attr.batch.flags = OPTS_GET(opts, flags, 0); in bpf_map_batch_common() 482 const struct bpf_map_batch_opts *opts) in bpf_map_delete_batch() argument 485 NULL, keys, NULL, count, opts); in bpf_map_delete_batch() 490 const struct bpf_map_batch_opts *opts) in bpf_map_lookup_batch() argument 493 out_batch, keys, values, count, opts); in bpf_map_lookup_batch() 498 const struct bpf_map_batch_opts *opts) in bpf_map_lookup_and_delete_batch() argument 502 count, opts); in bpf_map_lookup_and_delete_batch() [all …]
|
/tools/perf/arch/s390/util/ |
D | auxtrace.c | 49 struct record_opts *opts) in cpumsf_recording_options() argument 54 opts->full_auxtrace = true; in cpumsf_recording_options() 64 if (!opts->auxtrace_mmap_pages) { in cpumsf_recording_options() 65 if (opts->user_freq != UINT_MAX) in cpumsf_recording_options() 66 factor = (opts->user_freq + DEFAULT_FREQ in cpumsf_recording_options() 69 opts->auxtrace_mmap_pages = roundup_pow_of_two(pages); in cpumsf_recording_options() 77 struct record_opts *opts __maybe_unused, in cpumsf_parse_snapshot_options()
|
/tools/perf/arch/arm64/util/ |
D | arm-spe.c | 65 struct record_opts *opts) in arm_spe_recording_options() argument 86 opts->full_auxtrace = true; in arm_spe_recording_options() 90 if (!opts->full_auxtrace) in arm_spe_recording_options() 94 if (opts->full_auxtrace && !opts->auxtrace_mmap_pages) { in arm_spe_recording_options() 96 opts->auxtrace_mmap_pages = MiB(4) / page_size; in arm_spe_recording_options() 98 opts->auxtrace_mmap_pages = KiB(128) / page_size; in arm_spe_recording_options() 99 if (opts->mmap_pages == UINT_MAX) in arm_spe_recording_options() 100 opts->mmap_pages = KiB(256) / page_size; in arm_spe_recording_options() 105 if (opts->auxtrace_mmap_pages) { in arm_spe_recording_options() 106 size_t sz = opts->auxtrace_mmap_pages * (size_t)page_size; in arm_spe_recording_options()
|
/tools/bpf/bpftool/ |
D | map_perf_ring.c | 128 struct perf_buffer_raw_opts opts = {}; in do_event_pipe() local 194 opts.attr = &perf_attr; in do_event_pipe() 195 opts.event_cb = print_bpf_output; in do_event_pipe() 196 opts.ctx = &ctx; in do_event_pipe() 197 opts.cpu_cnt = ctx.all_cpus ? 0 : 1; in do_event_pipe() 198 opts.cpus = &ctx.cpu; in do_event_pipe() 199 opts.map_keys = &ctx.idx; in do_event_pipe() 201 pb = perf_buffer__new_raw(map_fd, MMAP_PAGE_CNT, &opts); in do_event_pipe()
|