diff --git a/DevTools/ProfileViewer/Profile.cpp b/DevTools/ProfileViewer/Profile.cpp index c9f2b27cdc..95182cd648 100644 --- a/DevTools/ProfileViewer/Profile.cpp +++ b/DevTools/ProfileViewer/Profile.cpp @@ -272,27 +272,6 @@ OwnPtr Profile::load_from_perfcore_file(const StringView& path) return NonnullOwnPtr(NonnullOwnPtr::Adopt, *new Profile(move(profile_events))); } -OwnPtr Profile::load_from_file(const StringView& path) -{ - auto file = Core::File::construct(path); - if (!file->open(Core::IODevice::ReadOnly)) { - fprintf(stderr, "Unable to open %s, error: %s\n", String(path).characters(), file->error_string()); - return nullptr; - } - - auto json = JsonValue::from_string(file->read_all()); - if (!json.is_array()) { - fprintf(stderr, "Invalid format (not a JSON array)\n"); - return nullptr; - } - - auto& samples = json.as_array(); - if (samples.is_empty()) - return nullptr; - - return NonnullOwnPtr(NonnullOwnPtr::Adopt, *new Profile(move(samples))); -} - void ProfileNode::sort_children() { sort_profile_nodes(m_children); diff --git a/DevTools/ProfileViewer/Profile.h b/DevTools/ProfileViewer/Profile.h index b195b771b7..de9cda3c74 100644 --- a/DevTools/ProfileViewer/Profile.h +++ b/DevTools/ProfileViewer/Profile.h @@ -101,7 +101,6 @@ private: class Profile { public: - static OwnPtr load_from_file(const StringView& path); static OwnPtr load_from_perfcore_file(const StringView& path); ~Profile();