Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338924
b: refs/heads/master
c: e84ba4e
h: refs/heads/master
v: v3
  • Loading branch information
Feng Tang authored and Arnaldo Carvalho de Melo committed Oct 29, 2012
1 parent 1d14474 commit 92973b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdbab7c201ab38f7b8d248ebf289025381166526
refs/heads/master: e84ba4e26833991d1c1c15a592b1474ee2b6dfdb
10 changes: 10 additions & 0 deletions trunk/tools/perf/util/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -2341,6 +2341,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)
{
Expand Down
1 change: 1 addition & 0 deletions trunk/tools/perf/util/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 92973b0

Please sign in to comment.