Namhyung Kim
4a86d41404
perf tools: Allow build-id with trailing zeros
...
Currently perf saves a build-id with size but old versions assumes the
size of 20. In case the build-id is less than 20 (like for MD5), it'd
fill the rest with 0s.
I saw a problem when old version of perf record saved a binary in the
build-id cache and new version of perf reads the data. The symbols
should be read from the build-id cache (as the path no longer has the
same binary) but it failed due to mismatch in the build-id.
symsrc__init: build id mismatch for /home/namhyung/.debug/.build-id/53/e4c2f42a4c61a2d632d92a72afa08f00000000/elf.
The build-id event in the data has 20 byte build-ids, but it saw a
different size (16) when it reads the build-id of the elf file in the
build-id cache.
$ readelf -n ~/.debug/.build-id/53/e4c2f42a4c61a2d632d92a72afa08f00000000/elf
Displaying notes found in: .note.gnu.build-id
Owner Data size Description
GNU 0x00000010 NT_GNU_BUILD_ID (unique build ID bitstring)
Build ID: 53e4c2f42a4c61a2d632d92a72afa08f
Let's fix this by allowing trailing zeros if the size is different.
Fixes: 39be8d0115 ("perf tools: Pass build_id object to dso__build_id_equal()")
Signed-off-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Jiri Olsa <jolsa@redhat.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Ian Rogers <irogers@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lore.kernel.org/lkml/20210910224630.1084877-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2021-09-11 16:04:47 -03:00
..
2021-04-07 16:23:20 -03:00
2021-07-05 14:16:57 -03:00
2021-09-03 08:17:25 -03:00
2021-07-07 11:40:56 -03:00
2021-03-23 17:13:43 -03:00
2021-09-03 08:18:25 -03:00
2021-09-08 11:50:27 -07:00
2021-09-10 18:15:21 -03:00
2021-08-31 15:12:00 -03:00
2021-03-06 16:42:31 -03:00
2021-07-01 16:14:36 -03:00
2021-08-31 15:12:00 -03:00
2021-08-31 15:12:00 -03:00
2021-04-07 16:18:49 -03:00
2021-07-09 14:04:28 -03:00
2021-07-29 17:23:52 -07:00
2021-07-01 16:14:19 -03:00
2021-09-10 18:32:04 -03:00
2021-03-23 17:13:43 -03:00
2021-09-10 18:15:21 -03:00
2021-02-18 16:41:40 -03:00
2021-02-18 16:41:40 -03:00
2021-03-23 17:13:43 -03:00
2021-03-23 17:13:43 -03:00
2021-07-09 14:04:31 -03:00
2021-07-05 14:16:57 -03:00
2021-08-30 10:06:22 -03:00
2021-01-20 14:34:21 -03:00
2020-12-24 10:05:28 -03:00
2020-12-24 10:05:28 -03:00
2021-05-17 10:55:10 -03:00
2021-05-17 10:55:10 -03:00
2021-09-03 08:18:24 -03:00
2021-09-03 08:15:10 -03:00
2021-08-02 10:06:51 -03:00
2021-08-02 10:06:51 -03:00
2021-04-29 10:30:58 -03:00
2021-07-18 09:27:49 -03:00
2021-05-12 12:43:10 -03:00
2021-05-25 10:07:17 -03:00
2021-05-25 10:07:17 -03:00
2021-01-20 14:34:20 -03:00
2021-08-03 17:03:18 -03:00
2021-03-23 17:13:43 -03:00
2021-03-30 12:45:59 -03:00
2021-02-17 15:15:06 -03:00
2021-08-11 09:35:44 -03:00
2021-08-11 09:35:44 -03:00
2021-09-11 16:04:47 -03:00
2021-08-03 17:04:08 -03:00
2021-07-18 09:31:15 -03:00
2021-07-18 09:31:15 -03:00
2021-03-01 14:47:50 -03:00
2021-09-10 11:45:19 -03:00
2021-09-10 11:45:19 -03:00
2021-02-08 17:09:11 -03:00
2021-05-21 16:41:37 -03:00
2021-09-03 08:29:55 -03:00
2021-08-11 16:07:32 -03:00
2021-08-11 16:07:32 -03:00
2021-08-11 16:07:32 -03:00
2021-09-01 11:24:43 -03:00
2021-01-20 14:34:21 -03:00
2021-09-11 16:00:13 -03:00
2021-09-11 16:00:13 -03:00
2021-03-23 17:13:43 -03:00
2021-08-30 10:06:16 -03:00
2021-09-08 12:55:35 -07:00
2021-08-02 10:09:05 -03:00
2021-04-29 10:30:59 -03:00
2021-04-29 10:30:59 -03:00
2021-07-07 11:40:56 -03:00
2021-02-08 17:02:00 -03:00
2021-02-08 17:02:00 -03:00
2021-04-20 08:40:20 -03:00
2021-04-20 08:40:20 -03:00
2021-02-03 13:10:44 -03:00
2021-04-29 10:31:00 -03:00
2021-03-23 17:13:43 -03:00
2021-08-31 15:18:16 -03:00
2021-07-15 17:30:22 -03:00
2021-06-19 10:06:46 -03:00
2021-02-18 16:14:33 -03:00
2020-12-19 17:52:24 -03:00
2021-07-30 18:26:22 -03:00
2021-03-23 17:13:43 -03:00
2021-06-16 15:05:24 -03:00
2021-06-01 11:04:59 -03:00
2021-09-08 11:50:27 -07:00
2021-04-08 14:23:39 -03:00
2021-09-08 11:50:27 -07:00
2021-08-31 16:21:17 -03:00
2021-02-03 13:10:44 -03:00
2021-02-03 13:10:44 -03:00
2021-09-11 16:00:34 -03:00
2021-04-29 10:30:59 -03:00
2021-09-11 16:00:34 -03:00
2021-04-29 10:30:59 -03:00
2021-05-19 14:23:23 -03:00
2021-09-03 08:33:26 -03:00
2021-08-24 15:01:31 -03:00
2021-06-01 10:32:00 -03:00
2021-06-01 10:32:00 -03:00
2021-09-11 15:58:36 -03:00
2021-02-18 16:24:43 -03:00
2021-07-14 10:05:35 -03:00
2021-04-29 10:30:59 -03:00
2021-05-17 10:55:10 -03:00
2021-09-03 08:33:26 -03:00
2021-09-03 08:33:26 -03:00
2021-07-18 09:31:15 -03:00
2021-07-18 09:31:15 -03:00
2021-07-18 09:27:37 -03:00
2021-07-18 09:31:15 -03:00
2021-07-18 09:31:15 -03:00
2021-04-29 10:30:59 -03:00
2021-07-09 14:04:28 -03:00
2021-07-09 14:04:31 -03:00
2021-01-20 14:34:20 -03:00
2021-03-23 17:13:43 -03:00
2021-04-08 14:24:14 -03:00
2021-09-10 18:15:21 -03:00
2021-09-10 18:15:21 -03:00
2021-09-03 08:29:55 -03:00
2021-08-02 10:09:05 -03:00
2021-01-20 14:34:21 -03:00
2021-07-15 17:27:52 -03:00
2021-07-15 17:27:52 -03:00
2021-06-08 09:36:36 -03:00
2021-07-14 10:05:35 -03:00
2021-07-09 14:04:31 -03:00
2021-07-09 14:04:31 -03:00
2021-04-20 08:40:20 -03:00
2021-03-23 17:13:43 -03:00
2021-07-09 14:04:28 -03:00
2021-03-23 17:13:43 -03:00
2021-02-17 15:15:06 -03:00
2021-02-17 15:15:06 -03:00
2021-02-08 17:09:11 -03:00
2021-03-08 11:17:51 -03:00
2021-07-07 10:28:10 -03:00
2021-09-10 11:45:19 -03:00
2021-08-02 10:14:34 -03:00
2021-08-02 10:14:34 -03:00
2021-03-01 14:49:28 -03:00
2021-01-20 14:25:28 -03:00
2021-08-11 16:04:33 -03:00
2021-03-25 08:59:10 -03:00
2021-02-03 13:13:53 -03:00
2021-03-06 16:54:26 -03:00
2021-06-01 10:03:17 -03:00
2021-09-03 08:18:25 -03:00
2021-04-29 10:31:00 -03:00
2021-04-29 10:31:00 -03:00
2021-03-15 11:36:54 -03:00
2021-03-15 11:36:54 -03:00
2021-02-18 14:20:32 -03:00
2021-03-23 17:13:43 -03:00
2021-03-24 10:38:56 -03:00