Scheduling analysis: Also record the number of times a thread waits on a
locking primitive. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27312 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -49,6 +49,7 @@ struct scheduling_analysis_thread_wait_object {
|
|||||||
thread_id thread;
|
thread_id thread;
|
||||||
scheduling_analysis_wait_object* wait_object;
|
scheduling_analysis_wait_object* wait_object;
|
||||||
bigtime_t wait_time;
|
bigtime_t wait_time;
|
||||||
|
int64 waits;
|
||||||
scheduling_analysis_thread_wait_object* next_in_list;
|
scheduling_analysis_thread_wait_object* next_in_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -897,6 +897,7 @@ struct ThreadWaitObject : HashObject, scheduling_analysis_thread_wait_object {
|
|||||||
this->thread = thread;
|
this->thread = thread;
|
||||||
wait_object = waitObject;
|
wait_object = waitObject;
|
||||||
wait_time = 0;
|
wait_time = 0;
|
||||||
|
waits = 0;
|
||||||
next_in_list = NULL;
|
next_in_list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1467,6 +1468,7 @@ analyze_scheduling(bigtime_t from, bigtime_t until,
|
|||||||
bigtime_t diffTime = entry->Time() - thread->lastTime;
|
bigtime_t diffTime = entry->Time() - thread->lastTime;
|
||||||
if (thread->waitObject != NULL) {
|
if (thread->waitObject != NULL) {
|
||||||
thread->waitObject->wait_time += diffTime;
|
thread->waitObject->wait_time += diffTime;
|
||||||
|
thread->waitObject->waits++;
|
||||||
thread->waitObject = NULL;
|
thread->waitObject = NULL;
|
||||||
} else if (thread->state != UNKNOWN)
|
} else if (thread->state != UNKNOWN)
|
||||||
thread->unspecified_wait_time += diffTime;
|
thread->unspecified_wait_time += diffTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user