|
@@ -2480,6 +2480,7 @@ static int check_magic_endian(u64 magic, uint64_t hdr_sz,
|
|
|
/* check for legacy format */
|
|
|
ret = memcmp(&magic, __perf_magic1, sizeof(magic));
|
|
|
if (ret == 0) {
|
|
|
+ ph->version = PERF_HEADER_VERSION_1;
|
|
|
pr_debug("legacy perf.data format\n");
|
|
|
if (is_pipe)
|
|
|
return try_all_pipe_abis(hdr_sz, ph);
|
|
@@ -2501,6 +2502,7 @@ static int check_magic_endian(u64 magic, uint64_t hdr_sz,
|
|
|
return -1;
|
|
|
|
|
|
ph->needs_swap = true;
|
|
|
+ ph->version = PERF_HEADER_VERSION_2;
|
|
|
|
|
|
return 0;
|
|
|
}
|