mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
Kernel: Add a syscall to clear the profiling buffer
While profiling all processes the profile buffer lives forever. Once you have copied the profile to disk, there's no need to keep it in memory. This syscall surfaces the ability to clear that buffer.
This commit is contained in:
parent
cdd9faaf39
commit
4ed682aebc
4 changed files with 42 additions and 0 deletions
|
@ -394,6 +394,7 @@ public:
|
|||
KResultOr<int> sys$module_unload(Userspace<const char*> name, size_t name_length);
|
||||
KResultOr<int> sys$profiling_enable(pid_t);
|
||||
KResultOr<int> sys$profiling_disable(pid_t);
|
||||
KResultOr<int> sys$profiling_free_buffer(pid_t);
|
||||
KResultOr<int> sys$futex(Userspace<const Syscall::SC_futex_params*>);
|
||||
KResultOr<int> sys$chroot(Userspace<const char*> path, size_t path_length, int mount_flags);
|
||||
KResultOr<int> sys$pledge(Userspace<const Syscall::SC_pledge_params*>);
|
||||
|
@ -520,6 +521,7 @@ private:
|
|||
bool dump_core();
|
||||
bool dump_perfcore();
|
||||
bool create_perf_events_buffer_if_needed();
|
||||
void delete_perf_events_buffer();
|
||||
|
||||
KResult do_exec(NonnullRefPtr<FileDescription> main_program_description, Vector<String> arguments, Vector<String> environment, RefPtr<FileDescription> interpreter_description, Thread*& new_main_thread, u32& prev_flags, const Elf32_Ehdr& main_program_header);
|
||||
KResultOr<ssize_t> do_write(FileDescription&, const UserOrKernelBuffer&, size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue