Thread (51 messages) 51 messages, 6 authors, 2012-03-09

Re: [PATCH v6 16/18] perf: enable reading of perf.data files from different ABI rev

From: David Ahern <hidden>
Date: 2012-02-10 00:37:33


On 02/09/2012 03:21 PM, Stephane Eranian wrote:
This patch allows perf to process perf.data files generated
using an ABI that has a different perf_event_attr struct size, i.e.,
a different ABI version.

The perf_event_attr can be extended, yet perf needs to cope with
older perf.data files. Similarly, perf must be able to cope with
a perf.data file which is using a newer version of the ABI than
what it knows about.

This patch adds read_attr(), a routine that reads a perf_event_attr
struct from a file incrementally based on its advertised size. If
the on-file struct is smaller than what perf knows, then the extra
fields are zeroed. If the on-file struct is bigger, then perf only
uses what it knows about, the rest is skipped.

Signed-off-by: Stephane Eranian <redacted>
Acked-by: David Ahern <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help