Solution for the potential deadlock when needing to flush the profiling
buffer during a timer event that interrupted a kernel function: We do now flush the buffer as soon as it is 70% full, *if* we didn't interrupt a kernel function. When the buffer runs full and we still haven't hit a user function, we drop the tick. The number of dropped ticks is recorded and sent to the debugger with the next update message. Reverted the previous partial solution (the temporary disabling of profiling while in debugger support code). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27658 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -556,6 +556,9 @@ typedef struct {
|
||||
int32 stack_depth; // number of return addresses per
|
||||
// tick
|
||||
int32 sample_count; // number of samples in the buffer
|
||||
int32 dropped_ticks; // number of ticks that had been
|
||||
// dropped, since the buffer was
|
||||
// full
|
||||
bool stopped; // if true, the thread is no longer
|
||||
// being profiled
|
||||
} debug_profiler_update;
|
||||
|
||||
Reference in New Issue
Block a user