Re: [PATCH] perf: make perf.data more self-descriptive (v5)

From: Robert Richter
Date: Fri Sep 23 2011 - 06:13:25 EST


On 22.09.11 08:31:28, Stephane Eranian wrote:
> We define the following useful new extensions:
> - HEADER_HOSTNAME: the hostname
> - HEADER_OSRELEASE: the kernel release number
> - HEADER_ARCH: the hw architecture
> - HEADER_CPUDESC: generic CPU description
> - HEADER_NRCPUS: number of online/avail cpus
> - HEADER_CMDLINE: perf command line
> - HEADER_VERSION: perf version
> - HEADER_TOPOLOGY: cpu topology
> - HEADER_EVENT_DESC: full event description (attrs)
> - HEADER_CPUID: easy-to-parse low level CPU identication

Stephane,

could we also put in the dynamical pmu mapping? This is important
esp. for decoding samples of dynamically registered pmus (ibs_op,
ibs_fetch, uncore, etc.). We need the type/name mapping information in
the header and the type encoding in the sample, e.g on a system with:

# cat /sys/devices/ibs_fetch/type
6
# cat /sys/devices/ibs_op/type
7

the header could contain something like:

HEADER_DYN_PMUS: ibs_fetch=6, ibs_op=7

Then we can encode the (dynamically generated) type value in the
sample and a parser may know its origin and format. This way we could
write costumized data sample parser which may detect the sampling
format from perf.data.

E.g. perf report could be used to encode IBS data samples without any
architectural or pmu specific command line.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/