Skip to content
Commit aa61fcf2 authored by Douglas RAILLARD's avatar Douglas RAILLARD
Browse files

lisa.trace: Add text trace parser

BREAKING CHANGE

Parse text traces based on the output of `trace-cmd report -R`
Also add some convenience parser for the human readable format.

Quick & dirty events based on calling trace_printk() in the kernel now
need to be prefixed with "trace_printk@" when parsed in lisa:

 kernel: trace_printk("foo: field1=42 field2=hello world")
 lisa  : trace.df_events('trace_printk@foo')

Matching on calling function name can be achieved with:

 kernel: (called from function foo()) trace_printk("field1=42 field2=hello world")
 lisa  : trace.df_events('trace_printk@func@foo')

Similarly, events generated from userspace by writing to
/sys/kernel/debug/tracing/trace_marker need to be prefixed:

 user: echo "foo: field1=42 field2=hello world" > /sys/kernel/debug/tracing/trace_marker
 lisa: trace.df_events('userspace@foo')

Note: The format is expected to follow the raw format of
`trace-cmd report -R`, such as in the example.

Also, event field names are now reflecting the name they have in the
kernel. Since trappy has non-optional renaming of the fields, client
code update might be needed. The recommended way is to use the high
level df_* functions from the analysis where applicable, since they will
give friendlier names and can usually cope with multiple formats of the
event across kernel versions if necessary.
parent 5bc4732c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment