1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:47:35 +00:00

Profiler: Use existing path split when mmapping libraries

We already extracted the `path` part of the segment name, so use that
for checking if the filename looks like a shared library.
This commit is contained in:
Tim Schumacher 2021-11-05 20:45:51 +01:00 committed by Andreas Kling
parent b7e6118098
commit fc6f265155

View file

@ -90,7 +90,7 @@ void LibraryMetadata::handle_mmap(FlatPtr base, size_t size, const String& name)
} else {
String path_string = path.to_string();
String full_path;
if (name.contains(".so"sv))
if (path_string.ends_with(".so"sv))
full_path = String::formatted("/usr/lib/{}", path);
else
full_path = path_string;