Re: [RFC PATCH v6 1/5] perf sched: sync state char array with the kernel

From: Steven Rostedt
Date: Thu Aug 03 2023 - 23:41:35 EST


On Fri, 4 Aug 2023 11:19:06 +0800
Ze Gao <zegao2021@xxxxxxxxx> wrote:

> I realize this is not perfect as well after second thoughts, since this does not
> take offline use of perf into consideration. People might run perf on different
> machines than where the perf.data gets recorded, in which way what we get
> from /sys/kernel/debug/tracing/events/sched/sched_switch/format is likely
> different from the perf.data.

If perf data files does what trace.dat files do, it should save the
file formats in the data files. It should not be reading the kernel
when reading the data file.

With trace-cmd, you can do: trace-cmd dump --events

And it will show you all the formats of the events that it saved in the
file.

-- Steve