From 73303f0dc12a354a7b6386ab79cca4b51c5e842a Mon Sep 17 00:00:00 2001 From: rvictorr Date: Sun, 13 Feb 2022 00:08:37 +0200 Subject: [PATCH] LibCore: Add syscall wrapper for profiling_free_buffer() --- 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 93bc34a157..872bbab715 100644 --- a/Userland/Libraries/LibCore/System.cpp +++ b/Userland/Libraries/LibCore/System.cpp @@ -167,6 +167,12 @@ ErrorOr profiling_disable(pid_t pid) int rc = ::profiling_disable(pid); HANDLE_SYSCALL_RETURN_VALUE("profiling_disable", rc, {}); } + +ErrorOr profiling_free_buffer(pid_t pid) +{ + int rc = ::profiling_free_buffer(pid); + HANDLE_SYSCALL_RETURN_VALUE("profiling_free_buffer", rc, {}); +} #endif #ifndef AK_OS_BSD_GENERIC diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index 79801c112f..eb429eb1d3 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -45,6 +45,7 @@ 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); +ErrorOr profiling_free_buffer(pid_t); #endif #ifndef AK_OS_BSD_GENERIC