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:
Ingo Weinhold
2008-09-04 00:07:11 +00:00
parent 212426b00e
commit e032a7f50e
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -49,6 +49,7 @@ struct scheduling_analysis_thread_wait_object {
thread_id thread;
scheduling_analysis_wait_object* wait_object;
bigtime_t wait_time;
int64 waits;
scheduling_analysis_thread_wait_object* next_in_list;
};
+2
View File
@@ -897,6 +897,7 @@ struct ThreadWaitObject : HashObject, scheduling_analysis_thread_wait_object {
this->thread = thread;
wait_object = waitObject;
wait_time = 0;
waits = 0;
next_in_list = NULL;
}
@@ -1467,6 +1468,7 @@ analyze_scheduling(bigtime_t from, bigtime_t until,
bigtime_t diffTime = entry->Time() - thread->lastTime;
if (thread->waitObject != NULL) {
thread->waitObject->wait_time += diffTime;
thread->waitObject->waits++;
thread->waitObject = NULL;
} else if (thread->state != UNKNOWN)
thread->unspecified_wait_time += diffTime;