summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-14 08:10:43 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-19 22:51:42 +0200
commit572bbf28ccd1cd5f8e4f17a38d0fbd989b1d56bf (patch)
tree1cc736a0f0fcfe96d4226b6cedfce9d80a62ca54 /Userland/DevTools/Profiler
parent8b2ace0326bceb28bdf80c0a09e8297acf39df97 (diff)
downloadserenity-572bbf28ccd1cd5f8e4f17a38d0fbd989b1d56bf.zip
Kernel+LibC: Add support for filtering profiling events
This adds the -t command-line argument for the profile tool. Using this argument you can filter which event types you want in your profile.
Diffstat (limited to 'Userland/DevTools/Profiler')
-rw-r--r--Userland/DevTools/Profiler/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp
index d94ee2e18a..bc05a18865 100644
--- a/Userland/DevTools/Profiler/main.cpp
+++ b/Userland/DevTools/Profiler/main.cpp
@@ -280,7 +280,7 @@ bool generate_profile(pid_t& pid)
process_name = "(unknown)";
}
- if (profiling_enable(pid) < 0) {
+ if (profiling_enable(pid, PERF_EVENT_MASK_ALL) < 0) {
int saved_errno = errno;
GUI::MessageBox::show(nullptr, String::formatted("Unable to profile process {}({}): {}", process_name, pid, strerror(saved_errno)), "Profiler", GUI::MessageBox::Type::Error);
return false;