* Changed the profiling API: Instead of sending all functions that shall
be tracked to the kernel, which then counts the hits, an area is passed to kernel in which the hits are recorded. When the area is full, the debugger is notified. For some reason that part doesn't work yet -- the whole system freezes when waiting for a reply. * Reorganized the profile tool code a bit. For one with respect to the changed API, but also to prepare tracking of image creation/deletion. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27640 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -72,25 +72,29 @@ struct thread_debug_info {
|
||||
// the signals the debugger wishes not to be notified of, when they
|
||||
// occur the next time
|
||||
|
||||
// profiling related part; if samples != NULL, the thread is profiled
|
||||
struct {
|
||||
bigtime_t interval;
|
||||
bigtime_t interval;
|
||||
// sampling interval
|
||||
area_id sample_area;
|
||||
// cloned sample buffer area
|
||||
addr_t* samples;
|
||||
// sample buffer
|
||||
int32 max_samples;
|
||||
// maximum number of samples the buffer can hold
|
||||
int32 sample_count;
|
||||
// number of samples the buffer currently holds
|
||||
int32 stack_depth;
|
||||
// number of return addresses to record per timer interval
|
||||
union {
|
||||
bigtime_t interval_left;
|
||||
bigtime_t interval_left;
|
||||
// when unscheduled: the time left of the current sampling
|
||||
// interval
|
||||
bigtime_t timer_end;
|
||||
bigtime_t timer_end;
|
||||
// when running: the absolute time the timer is supposed to go
|
||||
// off
|
||||
};
|
||||
int32 function_count;
|
||||
// number of tracked functions
|
||||
struct function_profile_info* functions;
|
||||
// array of tracked functions
|
||||
debug_profiler_stopped* result;
|
||||
// the result message to be sent to the debugger when profiling end;
|
||||
// contains the current hit counts for all functions
|
||||
timer* installed_timer;
|
||||
timer* installed_timer;
|
||||
// when running and being profiled: the CPU's profiling timer
|
||||
} profile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user