[tip:perf/core] perf tools: Continue processing header on unknown features

From: tip-bot for Robert Richter
Date: Thu Dec 29 2011 - 15:52:44 EST


Commit-ID: f7a8a1336416883dc0ccd96c17c604e34de61c25
Gitweb: http://git.kernel.org/tip/f7a8a1336416883dc0ccd96c17c604e34de61c25
Author: Robert Richter <robert.richter@xxxxxxx>
AuthorDate: Wed, 7 Dec 2011 10:02:51 +0100
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Fri, 23 Dec 2011 16:57:09 -0200

perf tools: Continue processing header on unknown features

A feature may be unknown if perf.data is created and parsed on different
perf tool versions. This should not stop the header to be processed,
instead continue processing it.

Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1323248577-11268-2-git-send-email-robert.richter@xxxxxxx
Signed-off-by: Robert Richter <robert.richter@xxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/header.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 4c48be8..428a4a2 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1109,7 +1109,7 @@ static int perf_file_section__fprintf_info(struct perf_file_section *section,
}
if (feat < HEADER_TRACE_INFO || feat >= HEADER_LAST_FEATURE) {
pr_warning("unknown feature %d\n", feat);
- return -1;
+ return 0;
}
if (!feat_ops[feat].print)
return 0;
--
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/