File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2341,6 +2341,16 @@ static int try_all_pipe_abis(uint64_t hdr_sz, struct perf_header *ph)
23412341 return -1 ;
23422342}
23432343
2344+ bool is_perf_magic (u64 magic )
2345+ {
2346+ if (!memcmp (& magic , __perf_magic1 , sizeof (magic ))
2347+ || magic == __perf_magic2
2348+ || magic == __perf_magic2_sw )
2349+ return true;
2350+
2351+ return false;
2352+ }
2353+
23442354static int check_magic_endian (u64 magic , uint64_t hdr_sz ,
23452355 bool is_pipe , struct perf_header * ph )
23462356{
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ int perf_event__synthesize_build_id(struct perf_tool *tool,
154154int perf_event__process_build_id (struct perf_tool * tool ,
155155 union perf_event * event ,
156156 struct perf_session * session );
157+ bool is_perf_magic (u64 magic );
157158
158159/*
159160 * arch specific callback
You can’t perform that action at this time.
0 commit comments