diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-23 11:32:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-23 11:33:36 +0100 |
commit | 58fb3ebf660e87a7ac93b5e8a7433ff441e30639 (patch) | |
tree | 1c899f032c0f07a3a8a74649204b2fd06f0775a5 /Userland/DevTools/Profiler | |
parent | c1c9da6c35ff3f28aefb6370dad898cb85e6bcef (diff) | |
download | serenity-58fb3ebf660e87a7ac93b5e8a7433ff441e30639.zip |
LibCore+AK: Move MappedFile from AK to LibCore
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
Diffstat (limited to 'Userland/DevTools/Profiler')
-rw-r--r-- | Userland/DevTools/Profiler/DisassemblyModel.cpp | 4 | ||||
-rw-r--r-- | Userland/DevTools/Profiler/Process.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/Profiler/Process.h | 4 | ||||
-rw-r--r-- | Userland/DevTools/Profiler/Profile.cpp | 4 | ||||
-rw-r--r-- | Userland/DevTools/Profiler/Profile.h | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/Userland/DevTools/Profiler/DisassemblyModel.cpp b/Userland/DevTools/Profiler/DisassemblyModel.cpp index 749377b38c..9cb250262b 100644 --- a/Userland/DevTools/Profiler/DisassemblyModel.cpp +++ b/Userland/DevTools/Profiler/DisassemblyModel.cpp @@ -6,7 +6,7 @@ #include "DisassemblyModel.h" #include "Profile.h" -#include <AK/MappedFile.h> +#include <LibCore/MappedFile.h> #include <LibDebug/DebugInfo.h> #include <LibELF/Image.h> #include <LibGUI/Painter.h> @@ -40,7 +40,7 @@ static ELF::Image* try_load_kernel_binary() { if (s_kernel_binary.has_value()) return &s_kernel_binary->elf; - auto kernel_binary_or_error = MappedFile::map("/boot/Kernel"); + auto kernel_binary_or_error = Core::MappedFile::map("/boot/Kernel"); if (!kernel_binary_or_error.is_error()) { auto kernel_binary = kernel_binary_or_error.release_value(); s_kernel_binary = { { kernel_binary, ELF::Image(kernel_binary->bytes()) } }; diff --git a/Userland/DevTools/Profiler/Process.cpp b/Userland/DevTools/Profiler/Process.cpp index 0924ab8959..1d46c6323e 100644 --- a/Userland/DevTools/Profiler/Process.cpp +++ b/Userland/DevTools/Profiler/Process.cpp @@ -48,7 +48,7 @@ static MappedObject* get_or_create_mapped_object(const String& path) if (auto it = g_mapped_object_cache.find(path); it != g_mapped_object_cache.end()) return it->value.ptr(); - auto file_or_error = MappedFile::map(path); + auto file_or_error = Core::MappedFile::map(path); if (file_or_error.is_error()) { g_mapped_object_cache.set(path, {}); return nullptr; diff --git a/Userland/DevTools/Profiler/Process.h b/Userland/DevTools/Profiler/Process.h index 322a5ff098..d63d2a7c61 100644 --- a/Userland/DevTools/Profiler/Process.h +++ b/Userland/DevTools/Profiler/Process.h @@ -8,16 +8,16 @@ #include "EventSerialNumber.h" #include <AK/HashMap.h> -#include <AK/MappedFile.h> #include <AK/OwnPtr.h> #include <AK/Vector.h> +#include <LibCore/MappedFile.h> #include <LibDebug/DebugInfo.h> #include <LibELF/Image.h> namespace Profiler { struct MappedObject { - NonnullRefPtr<MappedFile> file; + NonnullRefPtr<Core::MappedFile> file; ELF::Image elf; }; diff --git a/Userland/DevTools/Profiler/Profile.cpp b/Userland/DevTools/Profiler/Profile.cpp index 5166773352..54c6c33fdb 100644 --- a/Userland/DevTools/Profiler/Profile.cpp +++ b/Userland/DevTools/Profiler/Profile.cpp @@ -10,12 +10,12 @@ #include "SamplesModel.h" #include <AK/HashTable.h> #include <AK/LexicalPath.h> -#include <AK/MappedFile.h> #include <AK/NonnullOwnPtrVector.h> #include <AK/QuickSort.h> #include <AK/RefPtr.h> #include <AK/Try.h> #include <LibCore/File.h> +#include <LibCore/MappedFile.h> #include <LibELF/Image.h> #include <LibSymbolication/Symbolication.h> #include <sys/stat.h> @@ -226,7 +226,7 @@ ErrorOr<NonnullOwnPtr<Profile>> Profile::load_from_perfcore_file(StringView path auto& object = json.value().as_object(); if (!g_kernel_debuginfo_object.has_value()) { - auto debuginfo_file_or_error = MappedFile::map("/boot/Kernel.debug"); + auto debuginfo_file_or_error = Core::MappedFile::map("/boot/Kernel.debug"); if (!debuginfo_file_or_error.is_error()) { auto debuginfo_file = debuginfo_file_or_error.release_value(); auto debuginfo_image = ELF::Image(debuginfo_file->bytes()); diff --git a/Userland/DevTools/Profiler/Profile.h b/Userland/DevTools/Profiler/Profile.h index 377a3a65af..1e6ac39a36 100644 --- a/Userland/DevTools/Profiler/Profile.h +++ b/Userland/DevTools/Profiler/Profile.h @@ -17,10 +17,10 @@ #include <AK/JsonArray.h> #include <AK/JsonObject.h> #include <AK/JsonValue.h> -#include <AK/MappedFile.h> #include <AK/NonnullRefPtrVector.h> #include <AK/OwnPtr.h> #include <AK/Variant.h> +#include <LibCore/MappedFile.h> #include <LibELF/Image.h> #include <LibGUI/Forward.h> #include <LibGUI/ModelIndex.h> |