mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
perf symbols: Check before overwriting build_id
Added check to see if has_build_id is set before overwriting build_id. Signed-off-by: Tor Jeremiassen <tor@ti.com>
This commit is contained in:
parent
55ab378629
commit
56139d02e2
|
|
@ -344,7 +344,7 @@ int dso__load_sym(struct dso *dso, struct map *map __maybe_unused,
|
|||
if (ret >= 0)
|
||||
dso->is_64_bit = ret;
|
||||
|
||||
if (filename__read_build_id(ss->name, build_id, BUILD_ID_SIZE) > 0) {
|
||||
if ((!dso->has_build_id) && (filename__read_build_id(ss->name, build_id, BUILD_ID_SIZE) > 0)) {
|
||||
dso__set_build_id(dso, build_id);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1465,7 +1465,8 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
|
|||
* Read the build id if possible. This is required for
|
||||
* DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work
|
||||
*/
|
||||
if (filename__read_build_id(dso->name, build_id, BUILD_ID_SIZE) > 0)
|
||||
if ((!dso->has_build_id) &&
|
||||
(filename__read_build_id(dso->name, build_id, BUILD_ID_SIZE) > 0))
|
||||
dso__set_build_id(dso, build_id);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user