Lines Matching refs:opts
90 struct record_opts opts;
407 struct record_opts *opts = (struct record_opts *)opt->value;
410 opts->nr_cblocks = 0;
413 opts->nr_cblocks = strtol(str, NULL, 0);
414 if (!opts->nr_cblocks)
415 opts->nr_cblocks = nr_cblocks_default;
445 return rec->opts.nr_cblocks > 0;
454 struct record_opts *opts = (struct record_opts *)opt->value;
467 opts->mmap_flush = parse_tag_value(str, tags);
468 if (opts->mmap_flush == (int)-1)
469 opts->mmap_flush = strtol(str, NULL, 0);
472 if (!opts->mmap_flush)
473 opts->mmap_flush = MMAP_FLUSH_DEFAULT;
475 flush_max = evlist__mmap_size(opts->mmap_pages);
477 if (opts->mmap_flush > flush_max)
478 opts->mmap_flush = flush_max;
488 struct record_opts *opts = opt->value;
491 opts->comp_level = 0;
494 opts->comp_level = strtol(str, NULL, 0);
495 if (!opts->comp_level)
496 opts->comp_level = comp_level_default;
506 return rec->opts.comp_level > 0;
654 rec->opts.auxtrace_snapshot_size);
723 err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts,
724 rec->opts.auxtrace_snapshot_opts);
728 err = auxtrace_parse_sample_options(rec->itr, rec->evlist, &rec->opts,
729 rec->opts.auxtrace_sample_opts);
841 struct record_opts *opts = &rec->opts;
842 bool auxtrace_overwrite = opts->auxtrace_snapshot_mode ||
843 opts->auxtrace_sample_mode;
846 if (opts->affinity != PERF_AFFINITY_SYS)
849 if (evlist__mmap_ex(evlist, opts->mmap_pages,
850 opts->auxtrace_mmap_pages,
852 opts->nr_cblocks, opts->affinity,
853 opts->mmap_flush, opts->comp_level) < 0) {
860 opts->mmap_pages, opts->auxtrace_mmap_pages);
885 struct record_opts *opts = &rec->opts;
893 if (opts->initial_delay || target__has_cpu(&opts->target)) {
907 if (opts->initial_delay && !pos->immediate)
913 perf_evlist__config(evlist, opts, &callchain_param);
930 evsel__open_strerror(pos, &opts->target, errno, msg, sizeof(msg));
1053 if (rec->opts.affinity != PERF_AFFINITY_SYS &&
1150 if (map->auxtrace_mmap.base && !rec->opts.auxtrace_snapshot_mode &&
1151 !rec->opts.auxtrace_sample_mode &&
1199 if (!rec->opts.branch_stack)
1202 if (!rec->opts.full_auxtrace)
1205 if (!(rec->opts.use_clockid && rec->opts.clockid_res_ns))
1208 if (!rec->opts.use_clockid)
1246 if (rec->opts.tail_synthesize != tail)
1256 rec->opts.sample_address);
1276 if (target__none(&rec->opts.target))
1327 if (target__none(&rec->opts.target))
1379 struct record_opts *opts = &rec->opts;
1385 if (rec->opts.tail_synthesize != tail)
1432 if (rec->opts.auxtrace_sample_mode) {
1440 if (rec->opts.full_auxtrace) {
1489 machine, opts);
1498 if (rec->opts.nr_threads_synthesize > 1) {
1503 err = __machine__synthesize_threads(machine, tool, &opts->target, rec->evlist->core.threads,
1504 f, opts->sample_address,
1505 rec->opts.nr_threads_synthesize);
1507 if (rec->opts.nr_threads_synthesize > 1)
1523 struct record_opts *opts = &rec->opts;
1535 if (!opts->no_bpf_event) {
1551 if (perf_evlist__start_sb_thread(rec->sb_evlist, &rec->opts.target)) {
1553 opts->no_bpf_event = true;
1566 if (!rec->opts.use_clockid)
1569 if (rec->opts.use_clockid && rec->opts.clockid_res_ns)
1570 session->header.env.clock.clockid_res_ns = rec->opts.clockid_res_ns;
1572 session->header.env.clock.clockid = rec->opts.clockid;
1579 if (clock_gettime(rec->opts.clockid, &ref_clockid)) {
1613 struct record_opts *opts = &rec->opts;
1627 if (rec->opts.record_namespaces)
1630 if (rec->opts.record_cgroup) {
1639 if (rec->opts.auxtrace_snapshot_mode || rec->switch_output.enabled) {
1641 if (rec->opts.auxtrace_snapshot_mode)
1658 if (zstd_init(&session->zstd_data, rec->opts.comp_level) < 0) {
1678 session->header.env.comp_level = rec->opts.comp_level;
1680 if (rec->opts.kcore &&
1692 err = perf_evlist__prepare_workload(rec->evlist, &opts->target,
1709 rec->opts.sample_id = true;
1717 if (rec->opts.kcore) {
1789 if (!target__none(&opts->target) && !opts->initial_delay)
1841 if (evlist__initialize_ctlfd(rec->evlist, opts->ctl_fd, opts->ctl_fd_ack))
1844 if (opts->initial_delay) {
1846 if (opts->initial_delay > 0) {
1847 usleep(opts->initial_delay * USEC_PER_MSEC);
1966 if (done && !disabled && !target__none(&opts->target)) {
1976 if (opts->auxtrace_snapshot_on_exit)
1990 if (target__none(&rec->opts.target))
2043 if (rec->samples && !rec->opts.full_auxtrace)
2068 if (!opts->no_bpf_event)
2152 rec->opts.nr_cblocks = strtol(value, NULL, 0);
2153 if (!rec->opts.nr_cblocks)
2154 rec->opts.nr_cblocks = nr_cblocks_default;
2164 struct record_opts *opts = (struct record_opts *)opt->value;
2170 opts->affinity = PERF_AFFINITY_NODE;
2172 opts->affinity = PERF_AFFINITY_CPU;
2208 struct record_opts *opts = opt->value;
2228 opts->mmap_pages = mmap_pages;
2240 opts->auxtrace_mmap_pages = mmap_pages;
2251 struct record_opts *opts = opt->value;
2253 return evlist__parse_control(str, &opts->ctl_fd, &opts->ctl_fd_ack, &opts->ctl_fd_close);
2258 u64 wakeup_size = evlist__mmap_size(rec->opts.mmap_pages);
2331 if (s->size && !rec->opts.no_buffering)
2380 .opts = {
2428 OPT_STRING('p', "pid", &record.opts.target.pid, "pid",
2430 OPT_STRING('t', "tid", &record.opts.target.tid, "tid",
2434 OPT_BOOLEAN(0, "no-buffering", &record.opts.no_buffering,
2436 OPT_BOOLEAN('R', "raw-samples", &record.opts.raw_samples,
2438 OPT_BOOLEAN('a', "all-cpus", &record.opts.target.system_wide,
2440 OPT_STRING('C', "cpu", &record.opts.target.cpu_list, "cpu",
2442 OPT_U64('c', "count", &record.opts.user_interval, "event period to sample"),
2445 OPT_BOOLEAN_SET('i', "no-inherit", &record.opts.no_inherit,
2446 &record.opts.no_inherit_set,
2448 OPT_BOOLEAN(0, "tail-synthesize", &record.opts.tail_synthesize,
2450 OPT_BOOLEAN(0, "overwrite", &record.opts.overwrite, "use overwrite mode"),
2451 OPT_BOOLEAN(0, "no-bpf-event", &record.opts.no_bpf_event, "do not record bpf events"),
2452 OPT_BOOLEAN(0, "strict-freq", &record.opts.strict_freq,
2454 OPT_CALLBACK('F', "freq", &record.opts, "freq or 'max'",
2457 OPT_CALLBACK('m', "mmap-pages", &record.opts, "pages[,pages]",
2460 OPT_CALLBACK(0, "mmap-flush", &record.opts, "number",
2463 OPT_BOOLEAN(0, "group", &record.opts.group,
2468 OPT_CALLBACK(0, "call-graph", &record.opts,
2474 OPT_BOOLEAN('s', "stat", &record.opts.inherit_stat,
2476 OPT_BOOLEAN('d', "data", &record.opts.sample_address, "Record the sample addresses"),
2477 OPT_BOOLEAN(0, "phys-data", &record.opts.sample_phys_addr,
2479 OPT_BOOLEAN(0, "sample-cpu", &record.opts.sample_cpu, "Record the sample cpu"),
2480 OPT_BOOLEAN_SET('T', "timestamp", &record.opts.sample_time,
2481 &record.opts.sample_time_set,
2483 OPT_BOOLEAN_SET('P', "period", &record.opts.period, &record.opts.period_set,
2485 OPT_BOOLEAN('n', "no-samples", &record.opts.no_samples,
2496 OPT_INTEGER('D', "delay", &record.opts.initial_delay,
2498 OPT_BOOLEAN(0, "kcore", &record.opts.kcore, "copy /proc/kcore"),
2499 OPT_STRING('u', "uid", &record.opts.target.uid_str, "user",
2502 OPT_CALLBACK_NOOPT('b', "branch-any", &record.opts.branch_stack,
2506 OPT_CALLBACK('j', "branch-filter", &record.opts.branch_stack,
2509 OPT_BOOLEAN('W', "weight", &record.opts.sample_weight,
2511 OPT_BOOLEAN(0, "transaction", &record.opts.sample_transaction,
2513 OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread,
2515 OPT_CALLBACK_OPTARG('I', "intr-regs", &record.opts.sample_intr_regs, NULL, "any register",
2518 OPT_CALLBACK_OPTARG(0, "user-regs", &record.opts.sample_user_regs, NULL, "any register",
2521 OPT_BOOLEAN(0, "running-time", &record.opts.running_time,
2523 OPT_CALLBACK('k', "clockid", &record.opts,
2526 OPT_STRING_OPTARG('S', "snapshot", &record.opts.auxtrace_snapshot_opts,
2527 "opts", "AUX area tracing Snapshot Mode", ""),
2528 OPT_STRING_OPTARG(0, "aux-sample", &record.opts.auxtrace_sample_opts,
2529 "opts", "sample AUX area", ""),
2532 OPT_BOOLEAN(0, "namespaces", &record.opts.record_namespaces,
2534 OPT_BOOLEAN(0, "all-cgroups", &record.opts.record_cgroup,
2536 OPT_BOOLEAN_SET(0, "switch-events", &record.opts.record_switch_events,
2537 &record.opts.record_switch_events_set,
2539 OPT_BOOLEAN_FLAG(0, "all-kernel", &record.opts.all_kernel,
2542 OPT_BOOLEAN_FLAG(0, "all-user", &record.opts.all_user,
2545 OPT_BOOLEAN(0, "kernel-callchains", &record.opts.kernel_callchains,
2547 OPT_BOOLEAN(0, "user-callchains", &record.opts.user_callchains,
2573 OPT_CALLBACK_OPTARG(0, "aio", &record.opts,
2577 OPT_CALLBACK(0, "affinity", &record.opts, "node|cpu",
2581 OPT_CALLBACK_OPTARG('z', "compression-level", &record.opts, &comp_level_default,
2588 &record.opts.nr_threads_synthesize,
2595 OPT_CALLBACK(0, "control", &record.opts, "fd:ctl-fd[,ack-fd] or fifo:ctl-fifo[,ack-fifo]",
2635 rec->opts.affinity = PERF_AFFINITY_SYS;
2651 if (!argc && target__none(&rec->opts.target))
2652 rec->opts.target.system_wide = true;
2654 if (nr_cgroups && !rec->opts.target.system_wide) {
2660 if (rec->opts.kcore)
2663 if (rec->opts.comp_level != 0) {
2668 if (rec->opts.record_switch_events &&
2704 if (rec->opts.affinity != PERF_AFFINITY_SYS) {
2763 if (record.opts.overwrite)
2764 record.opts.tail_synthesize = true;
2767 __evlist__add_default(rec->evlist, !record.opts.no_samples) < 0) {
2772 if (rec->opts.target.tid && !rec->opts.no_inherit_set)
2773 rec->opts.no_inherit = true;
2775 err = target__validate(&rec->opts.target);
2777 target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
2781 err = target__parse_uid(&rec->opts.target);
2785 target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
2793 rec->opts.ignore_missing_thread = rec->opts.target.uid != UINT_MAX || rec->opts.target.pid;
2796 if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
2799 err = auxtrace_record__options(rec->itr, rec->evlist, &rec->opts);
2808 if (rec->opts.full_auxtrace)
2811 if (rec->opts.text_poke) {
2819 if (record_opts__config(&rec->opts)) {
2824 if (rec->opts.nr_cblocks > nr_cblocks_max)
2825 rec->opts.nr_cblocks = nr_cblocks_max;
2826 pr_debug("nr_cblocks: %d\n", rec->opts.nr_cblocks);
2828 pr_debug("affinity: %s\n", affinity_tags[rec->opts.affinity]);
2829 pr_debug("mmap flush: %d\n", rec->opts.mmap_flush);
2831 if (rec->opts.comp_level > comp_level_max)
2832 rec->opts.comp_level = comp_level_max;
2833 pr_debug("comp level: %d\n", rec->opts.comp_level);
2842 evlist__close_control(rec->opts.ctl_fd, rec->opts.ctl_fd_ack, &rec->opts.ctl_fd_close);