]> git.karo-electronics.de Git - karo-tx-linux.git/commit
perf tool: Unify handling of features when writing feature section
authorRobert Richter <robert.richter@amd.com>
Mon, 5 Dec 2011 13:23:51 +0000 (14:23 +0100)
committerRobert Richter <robert.richter@amd.com>
Thu, 15 Dec 2011 13:28:04 +0000 (14:28 +0100)
commit4729164e9d31fb26d6826e632c8f1931b2d82fb2
treee264a61b1594a91ecb76babf924b16394765b908
parent7354c6e191031f2c2dc6d20db7159002e0068c4d
perf tool: Unify handling of features when writing feature section

The features HEADER_TRACE_INFO and HEADER_BUILD_ID are handled
different when writing the feature section. All other features are
simply disabled on failure and writing the section goes on without
returning an error. There is no reason for these special cases. This
patch unifies handling of the features.

This should be ok since all features can be parsed independently.
Offset and size of a feature's block is stored in struct perf_file_
section right after the data block of perf.data (see perf_session__
write_header()). Thus, if a feature does not exist then other features
can be processed anyway.

Also moving special code for HEADER_BUILD_ID out to write_build_id().

v2:
* perf record throws an error now if buildids may not be generated,
  which can be disabled with the --no-buildid option.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
tools/perf/builtin-record.c
tools/perf/util/header.c