]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/util/symbol.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / tools / perf / util / symbol.c
index df2482b2ba45c47883a254db2ff4d6551aeea83b..70e389bc4af71aa8f18ae67507fb65b5093a7f98 100644 (file)
@@ -1459,9 +1459,12 @@ int dso__load(struct dso *dso, struct map *map)
         * Read the build id if possible. This is required for
         * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work
         */
-       if (is_regular_file(dso->long_name) &&
-           filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0)
+       if (!dso->has_build_id &&
+           is_regular_file(dso->long_name)) {
+           __symbol__join_symfs(name, PATH_MAX, dso->long_name);
+           if (filename__read_build_id(name, build_id, BUILD_ID_SIZE) > 0)
                dso__set_build_id(dso, build_id);
+       }
 
        /*
         * Iterate over candidate debug images.