tracing: Add hwlat_detector tracer
Connect the hwlat_detector written by Jon Masters with the
tracing system as a new ftrace tracer.
A few files are created when the hwlat_detector is enabled
that exist in the tracing directory.
hwlat_detector/count - the count of records of latencies found
hwlat_detector/width - time in usecs for how long to spin for
hwlat_detector/window - time in usecs between the start of each
iteration
The kernel thread will spin with interrupts disabled for "width"
microseconds in every "widow" cycle. It will not spin for
"window - width" microseconds, where the system can continue to operate.
To enable the tracer, simple echo in "hwlat_detector" into
"current_tracer"
# echo hwlat_detector > /sys/kernel/debug/tracing/current_tracer
Every time a hardware latency is found that is greater than
tracing_thresh (set and viewed by the tracing_thresh file in the
tracing directory), it is reported into the ftrace ring buffer.
The default value of tracing_thresh (if it was zero when the
hwlat_detector tracer began) is 10us. If it is not zero, the
threshold does not change.
The max latency found is set in the tracing_max_latency file.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
7 files changed