Skip to contentSkip to conversation

trace-cmd library: Write header before file sections

PATCH Superseded Tzvetomir Stoyanov (VMware) 1 participant 1 message Nov 11, 2021

v5 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 5/25 trace-cmd library: Write header before file sections

Headers are added before these file sections, in trace
file version 7:
- ftrace events format
- format of recorded events
- information of the mapping of function addresses to the function names
- trace_printk() format strings
- information of the mapping a PID to a process name

New options are defined for each of these sections, holding the section's offset into the trace file.

---
 .../include/private/trace-cmd-private.h       |   6 +
 lib/trace-cmd/trace-output.c                  | 110 ++++++++++++++----
 2 files changed, 93 insertions(+), 23 deletions(-)
lib/trace-cmd/include/private/trace-cmd-private.h +6 -0
index 5b253511..be9c79cc 100644
@@ -138,6 +138,12 @@ enum {
 	TRACECMD_OPTION_TIME_SHIFT,
 	TRACECMD_OPTION_GUEST,
 	TRACECMD_OPTION_TSC2NSEC,
+	TRACECMD_OPTION_HEADER_INFO,
+	TRACECMD_OPTION_FTRACE_EVENTS,
+	TRACECMD_OPTION_EVENT_FORMATS,
+	TRACECMD_OPTION_KALLSYMS,
+	TRACECMD_OPTION_PRINTK,
+	TRACECMD_OPTION_CMDLINES,
 	TRACECMD_OPTION_MAX,
 };
 
lib/trace-cmd/trace-output.c +87 -23

276 lines not on this page · raw message

Signature · 1 line
2.33.1