* It seems we always have to specify all flags to make it work; removed "flags"
parameter from start_system_profiler(). * Added stack depth, and interval parameters to it, though. * Profiling the boot process is now possible. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31671 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -15,7 +15,8 @@ struct system_profiler_parameters;
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
status_t start_system_profiler(size_t areaSize, uint32 flags);
|
status_t start_system_profiler(size_t areaSize, uint32 stackDepth,
|
||||||
|
bigtime_t interval);
|
||||||
void stop_system_profiler();
|
void stop_system_profiler();
|
||||||
|
|
||||||
status_t _user_system_profiler_start(
|
status_t _user_system_profiler_start(
|
||||||
|
|||||||
@@ -1141,7 +1141,7 @@ SystemProfiler::_ProfilingEvent(struct timer* timer)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
start_system_profiler(size_t areaSize, uint32 flags)
|
start_system_profiler(size_t areaSize, uint32 stackDepth, bigtime_t interval)
|
||||||
{
|
{
|
||||||
struct ParameterDeleter {
|
struct ParameterDeleter {
|
||||||
ParameterDeleter(area_id area)
|
ParameterDeleter(area_id area)
|
||||||
@@ -1184,11 +1184,12 @@ start_system_profiler(size_t areaSize, uint32 flags)
|
|||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
sRecordedParameters->buffer_area = area;
|
sRecordedParameters->buffer_area = area;
|
||||||
sRecordedParameters->flags
|
sRecordedParameters->flags = B_SYSTEM_PROFILER_TEAM_EVENTS
|
||||||
= flags | B_SYSTEM_PROFILER_SAMPLING_EVENTS;
|
| B_SYSTEM_PROFILER_THREAD_EVENTS | B_SYSTEM_PROFILER_IMAGE_EVENTS
|
||||||
|
| B_SYSTEM_PROFILER_SAMPLING_EVENTS;
|
||||||
sRecordedParameters->locking_lookup_size = 4096;
|
sRecordedParameters->locking_lookup_size = 4096;
|
||||||
sRecordedParameters->interval = 1000;
|
sRecordedParameters->interval = interval;
|
||||||
sRecordedParameters->stack_depth = 5;
|
sRecordedParameters->stack_depth = stackDepth;
|
||||||
|
|
||||||
area_info areaInfo;
|
area_info areaInfo;
|
||||||
get_area_info(area, &areaInfo);
|
get_area_info(area, &areaInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user