summaryrefslogtreecommitdiff
path: root/DevTools/ProfileViewer/Profile.cpp
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2020-04-17 14:40:38 +0300
committerAndreas Kling <kling@serenityos.org>2020-04-20 17:25:50 +0200
commitedaa9c06d923018dca173e1bd1fa2aea1ad7b32e (patch)
tree74d61c9bf990d3bcbef120082c68ad0f546a5468 /DevTools/ProfileViewer/Profile.cpp
parent5c1b3ce42ef59448f641e9cc0a63e781c9f243b0 (diff)
downloadserenity-edaa9c06d923018dca173e1bd1fa2aea1ad7b32e.zip
LibELF: Make ELF::Loader RefCounted
Diffstat (limited to 'DevTools/ProfileViewer/Profile.cpp')
-rw-r--r--DevTools/ProfileViewer/Profile.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/DevTools/ProfileViewer/Profile.cpp b/DevTools/ProfileViewer/Profile.cpp
index 1d19b8e341..b6653c876d 100644
--- a/DevTools/ProfileViewer/Profile.cpp
+++ b/DevTools/ProfileViewer/Profile.cpp
@@ -30,6 +30,7 @@
#include <AK/HashTable.h>
#include <AK/MappedFile.h>
#include <AK/QuickSort.h>
+#include <AK/RefPtr.h>
#include <LibCore/File.h>
#include <LibELF/Loader.h>
#include <stdio.h>
@@ -185,12 +186,12 @@ OwnPtr<Profile> Profile::load_from_perfcore_file(const StringView& path)
return nullptr;
}
- auto elf_loader = make<ELF::Loader>(static_cast<const u8*>(elf_file.data()), elf_file.size());
+ auto elf_loader = ELF::Loader::create(static_cast<const u8*>(elf_file.data()), elf_file.size());
MappedFile kernel_elf_file("/boot/kernel");
- OwnPtr<ELF::Loader> kernel_elf_loader;
+ RefPtr<ELF::Loader> kernel_elf_loader;
if (kernel_elf_file.is_valid())
- kernel_elf_loader = make<ELF::Loader>(static_cast<const u8*>(kernel_elf_file.data()), kernel_elf_file.size());
+ kernel_elf_loader = ELF::Loader::create(static_cast<const u8*>(kernel_elf_file.data()), kernel_elf_file.size());
auto events_value = object.get("events");
if (!events_value.is_array())