babeltrace2-filter.lttng-utils.debug-info - Linux
Overview
The babeltrace2-filter.lttng-utils.debug-info
command filters trace files by using a debug info configuration file. It produces a new trace file that only contains the data specified in the configuration file. This command is commonly used for reducing the size of trace files and for only keeping the relevant data for debugging purposes.
Syntax
babeltrace2-filter.lttng-utils.debug-info [options] <in-trace-out> <out-trace-file>
Options/Flags
-c, --config-file <file>
: Specifies the debug info configuration file.-s, --scope <scope>
: Filters based on a scope mode. Can be either "all", "event", or "context".-f, --filter <filter>
: Specifies a filter expression.-p, --print-header
: Prints the header of the output trace file.-v, --verbose
: Prints verbose information.-h, --help
: Prints help information.-V, --version
: Prints version information.
Examples
Simple Example
babeltrace2-filter.lttng-utils.debug-info -c my_config.txt in.lttng out.lttng
This command filters the in.lttng
trace file using the my_config.txt
configuration file and saves the filtered trace to out.lttng
.
Complex Example
babeltrace2-filter.lttng-utils.debug-info -c my_config.txt -s context -f 'ctype==TRACE_CTX' in.lttng out.lttng
This command filters the in.lttng
trace file using the my_config.txt
configuration file, only keeping the context scope, and further filtering by the ctype
field with the value TRACE_CTX
. The filtered trace is saved to out.lttng
.
Common Issues
- Make sure that the debug info configuration file is valid and exists.
- Check if the input trace file is a valid LTTng trace file.
- Ensure that the filter expression is syntactically correct.
Integration
This command can be integrated with other LTTng-related tools, such as lttng-analyze
, for further analysis and visualization of the filtered trace.
Related Commands
babeltrace2-filter.lttng-utils.event-id
babeltrace2-filter.lttng-utils.event-name
babeltrace2-filter.lttng-utils.predicate