1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

Profiler: Use absolute mmap paths as-is

This commit is contained in:
Tim Schumacher 2022-04-26 04:39:58 +02:00 committed by Linus Groh
parent 89da0f2da5
commit f8aea2a7e5

View file

@ -91,7 +91,9 @@ void LibraryMetadata::handle_mmap(FlatPtr base, size_t size, String const& name)
} else {
String path_string = path.to_string();
String full_path;
if (Core::File::looks_like_shared_library(path_string))
if (path_string.starts_with('/'))
full_path = path_string;
else if (Core::File::looks_like_shared_library(path_string))
full_path = String::formatted("/usr/lib/{}", path);
else
full_path = path_string;