'\" t
.\" Title: libtracefs
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 07/25/2024
.\" Manual: libtracefs Manual
.\" Source: libtracefs 1.8.1
.\" Language: English
.\"
.TH "LIBTRACEFS" "3" "07/25/2024" "libtracefs 1\&.8\&.1" "libtracefs Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
tracefs_options \- ftrace options, that can be controlled using tracefs library\&.
.SH "SYNOPSIS"
.sp
.nf
\fB#include \fR
enum tracefs_option_id {
\fBTRACEFS_OPTION_INVALID\fR,
\fBTRACEFS_OPTION_ANNOTATE\fR,
\fBTRACEFS_OPTION_BIN\fR,
\fBTRACEFS_OPTION_BLK_CGNAME\fR,
\fBTRACEFS_OPTION_BLK_CGROUP\fR,
\fBTRACEFS_OPTION_BLK_CLASSIC\fR,
\fBTRACEFS_OPTION_BLOCK\fR,
\fBTRACEFS_OPTION_CONTEXT_INFO\fR,
\fBTRACEFS_OPTION_DISABLE_ON_FREE\fR,
\fBTRACEFS_OPTION_DISPLAY_GRAPH\fR,
\fBTRACEFS_OPTION_EVENT_FORK\fR,
\fBTRACEFS_OPTION_FGRAPH_ABSTIME\fR,
\fBTRACEFS_OPTION_FGRAPH_CPU\fR,
\fBTRACEFS_OPTION_FGRAPH_DURATION\fR,
\fBTRACEFS_OPTION_FGRAPH_IRQS\fR,
\fBTRACEFS_OPTION_FGRAPH_OVERHEAD\fR,
\fBTRACEFS_OPTION_FGRAPH_OVERRUN\fR,
\fBTRACEFS_OPTION_FGRAPH_PROC\fR,
\fBTRACEFS_OPTION_FGRAPH_TAIL\fR,
\fBTRACEFS_OPTION_FUNC_STACKTRACE\fR,
\fBTRACEFS_OPTION_FUNCTION_FORK\fR,
\fBTRACEFS_OPTION_FUNCTION_TRACE\fR,
\fBTRACEFS_OPTION_GRAPH_TIME\fR,
\fBTRACEFS_OPTION_HEX\fR,
\fBTRACEFS_OPTION_IRQ_INFO\fR,
\fBTRACEFS_OPTION_LATENCY_FORMAT\fR,
\fBTRACEFS_OPTION_MARKERS\fR,
\fBTRACEFS_OPTION_OVERWRITE\fR,
\fBTRACEFS_OPTION_PAUSE_ON_TRACE\fR,
\fBTRACEFS_OPTION_PRINTK_MSG_ONLY\fR,
\fBTRACEFS_OPTION_PRINT_PARENT\fR,
\fBTRACEFS_OPTION_RAW\fR,
\fBTRACEFS_OPTION_RECORD_CMD\fR,
\fBTRACEFS_OPTION_RECORD_TGID\fR,
\fBTRACEFS_OPTION_SLEEP_TIME\fR,
\fBTRACEFS_OPTION_STACKTRACE\fR,
\fBTRACEFS_OPTION_SYM_ADDR\fR,
\fBTRACEFS_OPTION_SYM_OFFSET\fR,
\fBTRACEFS_OPTION_SYM_USEROBJ\fR,
\fBTRACEFS_OPTION_TRACE_PRINTK\fR,
\fBTRACEFS_OPTION_USERSTACKTRACE\fR,
\fBTRACEFS_OPTION_VERBOSE\fR,
};
.fi
.SH "DESCRIPTION"
.sp
This enum contains all ftrace options, that can be manipulated using tracefs library\&. More detailed information about each option is available in Documentation/trace/ftrace\&.rst from the Linux kernel tree, in the trace_options section\&. Note that some ftrace options cannot be manipulated by this library, as they are intended for internal, debug purposes\&. These options control the tracers or the trace output\&. All options have two states \- on and off, the default state is different for each of them\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Common options for all tracers:
\fBTRACEFS_OPTION_INVALID\fR Not a valid ftrace option, used by the API to indicate an error\&.
\fBTRACEFS_OPTION_ANNOTATE\fR Display when a new CPU buffer started\&.
\fBTRACEFS_OPTION_BIN\fR Display the formats in raw binary\&.
\fBTRACEFS_OPTION_CONTEXT_INFO\fR Show only the event data\&. Hides the comm, PID, timestamp, CPU, and other useful data\&.
\fBTRACEFS_OPTION_BLOCK\fR When set, reading trace_pipe will not block when polled\&.
\fBTRACEFS_OPTION_DISABLE_ON_FREE\fR When the free_buffer is closed, tracing will stop\&.
\fBTRACEFS_OPTION_DISPLAY_GRAPH\fR When set, the latency tracers will use function graph tracing instead of function tracing\&.
\fBTRACEFS_OPTION_EVENT_FORK\fR When set, tasks with PIDs listed in set_event_pid will have the PIDs of their children added to set_event_pid when those tasks fork\&.
\fBTRACEFS_OPTION_FUNCTION_FORK\fR When set, tasks with PIDs listed in set_ftrace_pid will have the PIDs of their children added to set_ftrace_pid when those tasks fork\&.
\fBTRACEFS_OPTION_FUNCTION_TRACE\fR When enabled, the latency tracers will trace functions\&.
\fBTRACEFS_OPTION_HEX\fR Display numbers in a hexadecimal format\&.
\fBTRACEFS_OPTION_IRQ_INFO\fR Display the interrupt, preempt count, need resched data\&.
\fBTRACEFS_OPTION_LATENCY_FORMAT\fR Display additional information about the latency\&.
\fBTRACEFS_OPTION_MARKERS\fR When set, the trace_marker is enabled \- writable (only by root)\&.
\fBTRACEFS_OPTION_OVERWRITE\fR Controls what happens when the trace buffer is full\&. If set, the oldest events are discarded and overwritten\&. If disabled, then the newest events are discarded\&.
\fBTRACEFS_OPTION_PAUSE_ON_TRACE\fR When set, opening the trace file for read, will pause writing to the ring buffer\&. When the file is closed, tracing will be enabled again\&.
\fBTRACEFS_OPTION_PRINTK_MSG_ONLY\fR When set, trace_printk()s will only show the format and not their parameters\&.
\fBTRACEFS_OPTION_PRINT_PARENT\fR On function traces, display the calling (parent) function as well as the function being traced\&.
\fBTRACEFS_OPTION_RAW\fR Display raw numbers\&.
\fBTRACEFS_OPTION_RECORD_CMD\fR Save a mapping with a pid and corresponding command\&.
\fBTRACEFS_OPTION_RECORD_TGID\fR Save a mapping with a pid and corresponding Thread Group IDs\&.
\fBTRACEFS_OPTION_STACKTRACE\fR Record a stack trace after any trace event\&.
\fBTRACEFS_OPTION_SYM_ADDR\fR Display the function address as well as the function name\&.
\fBTRACEFS_OPTION_SYM_OFFSET\fR Display not only the function name, but also the offset in the function\&.
\fBTRACEFS_OPTION_SYM_USEROBJ\fR When \fBTRACEFS_OPTION_USERSTACKTRACE\fR is set, look up which object the address belongs to, and print the object and a relative address\&.
\fBTRACEFS_OPTION_TRACE_PRINTK\fR Disable trace_printk() from writing into the buffer\&.
\fBTRACEFS_OPTION_USERSTACKTRACE\fR Records a stack trace of the current user space thread after each trace event\&.
\fBTRACEFS_OPTION_VERBOSE\fR When \fBTRACEFS_OPTION_LATENCY_FORMAT\fR is enabled, print more detailed information\&.
Options, specific to function tracer:
\fBTRACEFS_OPTION_FUNC_STACKTRACE\fR Record a stack trace after every function\&.
Options, specific to function_graph tracer:
\fBTRACEFS_OPTION_FGRAPH_ABSTIME\fR Display the timestamp at each line\&.
\fBTRACEFS_OPTION_FGRAPH_CPU\fR Display the CPU number of the CPU where the trace occurred\&.
\fBTRACEFS_OPTION_FGRAPH_DURATION\fR Display the duration of the amount of time at the end of each function, in microseconds\&.
\fBTRACEFS_OPTION_FGRAPH_IRQS\fR Trace functions that happen inside an interrupt\&.
\fBTRACEFS_OPTION_FGRAPH_OVERHEAD\fR Display a marker if a function takes longer than a certain amount of time\&.
\fBTRACEFS_OPTION_FGRAPH_OVERRUN\fR Display "overrun" of the call graph, in the case of functions missed due to big callstack\&.
\fBTRACEFS_OPTION_FGRAPH_PROC\fR Display the command of each process at every line\&.
\fBTRACEFS_OPTION_FGRAPH_TAIL\fR Display the function name on its return\&.
\fBTRACEFS_OPTION_SLEEP_TIME\fR Account time the task has been scheduled out as part of the function call\&.
\fBTRACEFS_OPTION_GRAPH_TIME\fR Display the time to call nested functions, if function profiler is enabled\&.
Options, specific to blk tracer:
\fBTRACEFS_OPTION_BLK_CGNAME\fR
\fBTRACEFS_OPTION_BLK_CGROUP\fR
\fBTRACEFS_OPTION_BLK_CLASSIC\fR Display a more minimalistic output\&.
.fi
.if n \{\
.RE
.\}
.SH "FILES"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBtracefs\&.h\fR
Header file to include in order to have access to the library APIs\&.
\fB\-ltracefs\fR
Linker switch to add when building a program that uses the library\&.
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.sp
\fBlibtracefs\fR(3), \fBlibtraceevent\fR(3), \fBtrace\-cmd\fR(1), \fIDocumentation/trace/ftrace\&.rst\fR from the Linux kernel tree\&.
.SH "AUTHOR"
.sp
.if n \{\
.RS 4
.\}
.nf
\fBSteven Rostedt\fR <\m[blue]\fBrostedt@goodmis\&.org\fR\m[]\&\s-2\u[1]\d\s+2>
\fBTzvetomir Stoyanov\fR <\m[blue]\fBtz\&.stoyanov@gmail\&.com\fR\m[]\&\s-2\u[2]\d\s+2>
.fi
.if n \{\
.RE
.\}
.SH "REPORTING BUGS"
.sp
Report bugs to <\m[blue]\fBlinux\-trace\-devel@vger\&.kernel\&.org\fR\m[]\&\s-2\u[3]\d\s+2>
.SH "LICENSE"
.sp
libtracefs is Free Software licensed under the GNU LGPL 2\&.1
.SH "RESOURCES"
.sp
\m[blue]\fBhttps://git\&.kernel\&.org/pub/scm/libs/libtrace/libtracefs\&.git/\fR\m[]
.SH "COPYING"
.sp
Copyright (C) 2021 VMware, Inc\&. Free use of this software is granted under the terms of the GNU Public License (GPL)\&.
.SH "NOTES"
.IP " 1." 4
rostedt@goodmis.org
.RS 4
\%mailto:rostedt@goodmis.org
.RE
.IP " 2." 4
tz.stoyanov@gmail.com
.RS 4
\%mailto:tz.stoyanov@gmail.com
.RE
.IP " 3." 4
linux-trace-devel@vger.kernel.org
.RS 4
\%mailto:linux-trace-devel@vger.kernel.org
.RE