1020ac568SIngo Weinhold /* 2020ac568SIngo Weinhold * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. 3020ac568SIngo Weinhold * Distributed under the terms of the MIT License. 4020ac568SIngo Weinhold */ 5020ac568SIngo Weinhold #ifndef _SYSTEM_SCHEDULER_DEFS_H 6020ac568SIngo Weinhold #define _SYSTEM_SCHEDULER_DEFS_H 7020ac568SIngo Weinhold 8020ac568SIngo Weinhold #include <OS.h> 9020ac568SIngo Weinhold 10020ac568SIngo Weinhold 11020ac568SIngo Weinhold struct scheduling_analysis_thread_wait_object; 12020ac568SIngo Weinhold 13020ac568SIngo Weinhold struct scheduling_analysis_thread { 14020ac568SIngo Weinhold thread_id id; 15020ac568SIngo Weinhold char name[B_OS_NAME_LENGTH]; 16020ac568SIngo Weinhold 17020ac568SIngo Weinhold int64 runs; 18020ac568SIngo Weinhold bigtime_t total_run_time; 19020ac568SIngo Weinhold bigtime_t min_run_time; 20020ac568SIngo Weinhold bigtime_t max_run_time; 21020ac568SIngo Weinhold 22020ac568SIngo Weinhold int64 latencies; 23020ac568SIngo Weinhold bigtime_t total_latency; 24020ac568SIngo Weinhold bigtime_t min_latency; 25020ac568SIngo Weinhold bigtime_t max_latency; 26020ac568SIngo Weinhold 27020ac568SIngo Weinhold int64 reruns; 28020ac568SIngo Weinhold bigtime_t total_rerun_time; 29020ac568SIngo Weinhold bigtime_t min_rerun_time; 30020ac568SIngo Weinhold bigtime_t max_rerun_time; 31020ac568SIngo Weinhold 32020ac568SIngo Weinhold bigtime_t unspecified_wait_time; 33020ac568SIngo Weinhold 34020ac568SIngo Weinhold int64 preemptions; 35020ac568SIngo Weinhold 36020ac568SIngo Weinhold scheduling_analysis_thread_wait_object* wait_objects; 37020ac568SIngo Weinhold }; 38020ac568SIngo Weinhold 39020ac568SIngo Weinhold 40020ac568SIngo Weinhold struct scheduling_analysis_wait_object { 41020ac568SIngo Weinhold uint32 type; 42020ac568SIngo Weinhold void* object; 43020ac568SIngo Weinhold char name[B_OS_NAME_LENGTH]; 44020ac568SIngo Weinhold void* referenced_object; 45020ac568SIngo Weinhold }; 46020ac568SIngo Weinhold 47020ac568SIngo Weinhold 48020ac568SIngo Weinhold struct scheduling_analysis_thread_wait_object { 49020ac568SIngo Weinhold thread_id thread; 50020ac568SIngo Weinhold scheduling_analysis_wait_object* wait_object; 51020ac568SIngo Weinhold bigtime_t wait_time; 52*e032a7f5SIngo Weinhold int64 waits; 53020ac568SIngo Weinhold scheduling_analysis_thread_wait_object* next_in_list; 54020ac568SIngo Weinhold }; 55020ac568SIngo Weinhold 56020ac568SIngo Weinhold 57020ac568SIngo Weinhold struct scheduling_analysis { 58020ac568SIngo Weinhold uint32 thread_count; 59020ac568SIngo Weinhold scheduling_analysis_thread** threads; 60020ac568SIngo Weinhold uint64 wait_object_count; 61020ac568SIngo Weinhold uint64 thread_wait_object_count; 62020ac568SIngo Weinhold }; 63020ac568SIngo Weinhold 64020ac568SIngo Weinhold 65020ac568SIngo Weinhold #endif /* _SYSTEM_SCHEDULER_DEFS_H */ 66