summaryrefslogtreecommitdiff
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 20:13:19 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 20:13:19 +0400
commitf2e5d078f7f02d4289db31f5f63e23e39914075e (patch)
treec739a3e70846284ae2ce3d98cecc2be1ffebe2e2 /tools/perf/util/header.c
parentc66a566afbe6e2c94b1ae70f70cc1e3d4c73639b (diff)
parent836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff)
downloadlinux-f2e5d078f7f02d4289db31f5f63e23e39914075e.tar.xz
Merge tag 'v3.8-rc7' into regulator-core
Linux 3.8-rc7
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 566b84c695c8..b7da4634a047 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -23,6 +23,7 @@
#include "pmu.h"
#include "vdso.h"
#include "strbuf.h"
+#include "build-id.h"
static bool no_buildid_cache = false;
@@ -2342,6 +2343,16 @@ static int try_all_pipe_abis(uint64_t hdr_sz, struct perf_header *ph)
return -1;
}
+bool is_perf_magic(u64 magic)
+{
+ if (!memcmp(&magic, __perf_magic1, sizeof(magic))
+ || magic == __perf_magic2
+ || magic == __perf_magic2_sw)
+ return true;
+
+ return false;
+}
+
static int check_magic_endian(u64 magic, uint64_t hdr_sz,
bool is_pipe, struct perf_header *ph)
{