tools/tracing/rtla/src/cli_p.h
Source file repositories/reference/linux-study-clean/tools/tracing/rtla/src/cli_p.h
File Facts
- System
- Linux kernel
- Corpus path
tools/tracing/rtla/src/cli_p.h- Extension
.h- Size
- 17633 bytes
- Lines
- 688
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hsubcmd/parse-options.hcli.hosnoise.htimerlat.h
Detected Declarations
struct osnoise_cb_datastruct timerlat_cb_datafunction typefunction opt_int_callbackfunction opt_cpus_cbfunction opt_cgroup_cbfunction opt_duration_cbfunction opt_event_cbfunction opt_housekeeping_cbfunction opt_priority_cbfunction opt_trigger_cbfunction opt_filter_cbfunction opt_osnoise_auto_cbfunction opt_osnoise_period_cbfunction opt_osnoise_runtime_cbfunction opt_osnoise_trace_output_cbfunction opt_osnoise_on_threshold_cbfunction opt_osnoise_on_end_cbfunction opt_timerlat_period_cbfunction opt_timerlat_auto_cbfunction opt_dma_latency_cbfunction opt_aa_only_cbfunction opt_timerlat_trace_output_cbfunction opt_timerlat_on_threshold_cbfunction opt_timerlat_on_end_cbfunction opt_user_threads_cbfunction opt_nano_cbfunction opt_stack_format_cbfunction opt_timerlat_align_cbfunction opt_bucket_size_cbfunction opt_entries_cb
Annotated Snippet
struct osnoise_cb_data {
struct osnoise_params *params;
char *trace_output;
};
struct timerlat_cb_data {
struct timerlat_params *params;
char *trace_output;
};
/*
* Macros for command line options common to all tools
*
* Note: Some of the options are common to both timerlat and osnoise, but
* have a slightly different meaning. Such options take additional arguments
* that have to be provided by the *_parse_args() function of the corresponding
* tool.
*
* All macros defined here assume the presence of a params variable of
* the corresponding tool type (i.e struct timerlat_params or struct osnoise_params)
* and a cb_data variable of the matching type.
*/
#define RTLA_OPT_STOP(short, long, name) OPT_CALLBACK_FLAG(short, long, \
¶ms->common.stop_us, \
"us", \
"stop trace if " name " is higher than the argument in us", \
opt_llong_callback, PARSE_OPT_NOAUTONEG)
#define RTLA_OPT_STOP_TOTAL(short, long, name) OPT_CALLBACK_FLAG(short, long, \
¶ms->common.stop_total_us, \
"us", \
"stop trace if " name " is higher than the argument in us", \
opt_llong_callback, PARSE_OPT_NOAUTONEG)
#define RTLA_OPT_TRACE_OUTPUT(tracer, cb) OPT_CALLBACK_OPTARG('t', "trace", \
(const char **)&cb_data.trace_output, \
tracer "_trace.txt", \
"[file]", \
"save the stopped trace to [file|" tracer "_trace.txt]", \
cb)
#define RTLA_OPT_CPUS OPT_CALLBACK('c', "cpus", ¶ms->common, \
"cpu-list", \
"run the tracer only on the given cpus", \
opt_cpus_cb)
#define RTLA_OPT_CGROUP OPT_CALLBACK_OPTARG('C', "cgroup", ¶ms->common, \
"[cgroup_name]", NULL, \
"set cgroup, no argument means rtla's cgroup will be inherited", \
opt_cgroup_cb)
#define RTLA_OPT_USER_THREADS OPT_CALLBACK_NOOPT('u', "user-threads", params, NULL, \
"use rtla user-space threads instead of kernel-space timerlat threads", \
opt_user_threads_cb)
#define RTLA_OPT_KERNEL_THREADS OPT_BOOLEAN('k', "kernel-threads", \
¶ms->common.kernel_workload, \
"use timerlat kernel-space threads instead of rtla user-space threads")
#define RTLA_OPT_USER_LOAD OPT_BOOLEAN('U', "user-load", ¶ms->common.user_data, \
"enable timerlat for user-defined user-space workload")
#define RTLA_OPT_DURATION OPT_CALLBACK('d', "duration", ¶ms->common, \
"time[s|m|h|d]", \
"set the duration of the session", \
opt_duration_cb)
#define RTLA_OPT_EVENT OPT_CALLBACK('e', "event", ¶ms->common.events, \
"sys:event", \
"enable the <sys:event> in the trace instance, multiple -e are allowed", \
opt_event_cb)
#define RTLA_OPT_HOUSEKEEPING OPT_CALLBACK('H', "house-keeping", ¶ms->common, \
"cpu-list", \
"run rtla control threads only on the given cpus", \
opt_housekeeping_cb)
#define RTLA_OPT_PRIORITY OPT_CALLBACK('P', "priority", ¶ms->common, \
"o:prio|r:prio|f:prio|d:runtime:period", \
"set scheduling parameters", \
opt_priority_cb)
#define RTLA_OPT_TRIGGER OPT_CALLBACK(0, "trigger", ¶ms->common.events, \
"trigger", \
"enable a trace event trigger to the previous -e event", \
opt_trigger_cb)
#define RTLA_OPT_FILTER OPT_CALLBACK(0, "filter", ¶ms->common.events, \
"filter", \
Annotation
- Immediate include surface: `linux/kernel.h`, `subcmd/parse-options.h`, `cli.h`, `osnoise.h`, `timerlat.h`.
- Detected declarations: `struct osnoise_cb_data`, `struct timerlat_cb_data`, `function type`, `function opt_int_callback`, `function opt_cpus_cb`, `function opt_cgroup_cb`, `function opt_duration_cb`, `function opt_event_cb`, `function opt_housekeeping_cb`, `function opt_priority_cb`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.