haiku/headers
Augustin Cavalier 6baf6183d0 kernel/user_debugger: Rework profiler flush mechanism.
Instead of taking the sample inside the timer callback
or the flush callback depending, always take it in the timer
callback, for consistency's sake. This should always work
because we try to flush the buffer when it's only 70% full;
in testing I can't recall seeing any dropped ticks.

Also add a flush call in the post_syscall hook, in case
we hit the flush threshhold while profiling in the kernel
and couldn't trigger the flush then.

Seems to significantly reduce "missed" ticks overall,
but there are still wildly inconsistent results and
lots of missing time.

Change-Id: I43a5e9c050a50309329da39f8a2386c3e2b3c0dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7851
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-07-18 16:40:20 +00:00
..
build elf: add PT_RISCV_ATTRIBUTES program header 2023-09-25 15:20:13 +00:00
compatibility pthread: Implement pthread_timedjoin_np. 2024-07-16 19:59:39 +00:00
config
cpp
glibc
libs udis86: remove 2024-07-17 19:11:50 +00:00
os profiler: Actually support profiling user stack frames only. 2024-07-16 20:37:40 -04:00
posix POSIX: move getentropy(2) from libbsd 2024-07-16 16:09:00 +00:00
private kernel/user_debugger: Rework profiler flush mechanism. 2024-07-18 16:40:20 +00:00
tools