mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
Kernel+Profiler: Improve profiling subsystem
This turns the perfcore format into more a log than it was before, which lets us properly log process, thread and region creation/destruction. This also makes it unnecessary to dump the process' regions every time it is scheduled like we did before. Incidentally this also fixes 'profile -c' because we previously ended up incorrectly dumping the parent's region map into the profile data. Log-based mmap support enables profiling shared libraries which are loaded at runtime, e.g. via dlopen(). This enables profiling both the parent and child process for programs which use execve(). Previously we'd discard the profiling data for the old process. The Profiler tool has been updated to not treat thread IDs as process IDs anymore. This enables support for processes with more than one thread. Also, there's a new widget to filter which process should be displayed.
This commit is contained in:
parent
f57c57966b
commit
eb798d5538
26 changed files with 658 additions and 292 deletions
|
@ -75,9 +75,18 @@ int futex(uint32_t* userspace_address, int futex_op, uint32_t value, const struc
|
|||
|
||||
int purge(int mode);
|
||||
|
||||
#define PERF_EVENT_SAMPLE 0
|
||||
#define PERF_EVENT_MALLOC 1
|
||||
#define PERF_EVENT_FREE 2
|
||||
enum {
|
||||
PERF_EVENT_SAMPLE,
|
||||
PERF_EVENT_MALLOC,
|
||||
PERF_EVENT_FREE,
|
||||
PERF_EVENT_MMAP,
|
||||
PERF_EVENT_MUNMAP,
|
||||
PERF_EVENT_PROCESS_CREATE,
|
||||
PERF_EVENT_PROCESS_EXEC,
|
||||
PERF_EVENT_PROCESS_EXIT,
|
||||
PERF_EVENT_THREAD_CREATE,
|
||||
PERF_EVENT_THREAD_EXIT
|
||||
};
|
||||
|
||||
int perf_event(int type, uintptr_t arg1, uintptr_t arg2);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue