aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.h
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2012-10-30 11:56:07 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-29 11:56:59 -0200
commite84ba4e26833991d1c1c15a592b1474ee2b6dfdb (patch)
treea73d2b23c722ac3c1bbf08c075d124ccbe510ec7 /tools/perf/util/header.h
parentperf hists browser: Integrate script browser into main hists browser (diff)
downloadlinux-dev-e84ba4e26833991d1c1c15a592b1474ee2b6dfdb.tar.xz
linux-dev-e84ba4e26833991d1c1c15a592b1474ee2b6dfdb.zip
perf header: Add is_perf_magic() func
With this function, other modules can basically check whether a file is a legal perf data file by checking its first 8 bytes against all possible perf magic numbers. Change the function name from check_perf_magic to more meaningful is_perf_magic as suggested by acme. Signed-off-by: Feng Tang <feng.tang@intel.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1351569369-26732-7-git-send-email-feng.tang@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.h')
-rw-r--r--tools/perf/util/header.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index 879d215cdac9..5f1cd6884f37 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -154,6 +154,7 @@ int perf_event__synthesize_build_id(struct perf_tool *tool,
int perf_event__process_build_id(struct perf_tool *tool,
union perf_event *event,
struct perf_session *session);
+bool is_perf_magic(u64 magic);
/*
* arch specific callback