From 014c0d68c0bd60e2c4262abd6407d48398aaeb10 Mon Sep 17 00:00:00 2001 From: rvictorr Date: Sun, 13 Feb 2022 00:08:16 +0200 Subject: [PATCH] LibCore: Add syscall wrapper for profiling_disable() --- Userland/Libraries/LibCore/System.cpp | 6 ++++++ Userland/Libraries/LibCore/System.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Userland/Libraries/LibCore/System.cpp b/Userland/Libraries/LibCore/System.cpp index 8106a0f7cd5..93bc34a1574 100644 --- a/Userland/Libraries/LibCore/System.cpp +++ b/Userland/Libraries/LibCore/System.cpp @@ -161,6 +161,12 @@ ErrorOr profiling_enable(pid_t pid, u64 event_mask) int rc = ::profiling_enable(pid, event_mask); HANDLE_SYSCALL_RETURN_VALUE("profiling_enable", rc, {}); } + +ErrorOr profiling_disable(pid_t pid) +{ + int rc = ::profiling_disable(pid); + HANDLE_SYSCALL_RETURN_VALUE("profiling_disable", rc, {}); +} #endif #ifndef AK_OS_BSD_GENERIC diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index 95fd4e82f93..79801c112f5 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -44,6 +44,7 @@ ErrorOr umount(StringView mount_point); ErrorOr ptrace(int request, pid_t tid, void* address, void* data); ErrorOr disown(pid_t pid); ErrorOr profiling_enable(pid_t, u64 event_mask); +ErrorOr profiling_disable(pid_t); #endif #ifndef AK_OS_BSD_GENERIC