1 /* 2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _SYSTEM_SCHEDULER_DEFS_H 6 #define _SYSTEM_SCHEDULER_DEFS_H 7 8 #include <OS.h> 9 10 11 struct scheduling_analysis_thread_wait_object; 12 13 struct scheduling_analysis_thread { 14 thread_id id; 15 char name[B_OS_NAME_LENGTH]; 16 17 int64 runs; 18 bigtime_t total_run_time; 19 bigtime_t min_run_time; 20 bigtime_t max_run_time; 21 22 int64 latencies; 23 bigtime_t total_latency; 24 bigtime_t min_latency; 25 bigtime_t max_latency; 26 27 int64 reruns; 28 bigtime_t total_rerun_time; 29 bigtime_t min_rerun_time; 30 bigtime_t max_rerun_time; 31 32 bigtime_t unspecified_wait_time; 33 34 int64 preemptions; 35 36 scheduling_analysis_thread_wait_object* wait_objects; 37 }; 38 39 40 struct scheduling_analysis_wait_object { 41 uint32 type; 42 void* object; 43 char name[B_OS_NAME_LENGTH]; 44 void* referenced_object; 45 }; 46 47 48 struct scheduling_analysis_thread_wait_object { 49 thread_id thread; 50 scheduling_analysis_wait_object* wait_object; 51 bigtime_t wait_time; 52 int64 waits; 53 scheduling_analysis_thread_wait_object* next_in_list; 54 }; 55 56 57 struct scheduling_analysis { 58 uint32 thread_count; 59 scheduling_analysis_thread** threads; 60 uint64 wait_object_count; 61 uint64 thread_wait_object_count; 62 }; 63 64 65 #endif /* _SYSTEM_SCHEDULER_DEFS_H */ 66