020ac56840
unscheduled was incorrect. * Introduced _kern_analyze_scheduling() syscall. It requires scheduler kernel tracing to be enabled. It uses the tracing entries for a given period of time to do a similar analysis the "scheduler" debugger command does (i.e. number of runs, run time, latencies, preemption times) for each thread. Additionally the analysis includes for each thread how long the thread waited on each locking primitive in total. * Added kernel tracing for the creation of semaphores and initialization of condition variables, mutexes, and rw locks. The enabling macro is SCHEDULING_ANALYSIS_TRACING. The only purpose is to provide _kern_analyze_scheduling() with more info on the locking primitives (the name in particular). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27304 a95241bf-73f2-0310-859d-f6bbb57e9c96
35 lines
691 B
C
35 lines
691 B
C
/*
|
|
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef KERNEL_SCHEDULER_H
|
|
#define KERNEL_SCHEDULER_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
struct scheduling_analysis;
|
|
struct thread;
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void scheduler_enqueue_in_run_queue(struct thread *thread);
|
|
void scheduler_remove_from_run_queue(struct thread *thread);
|
|
void scheduler_reschedule(void);
|
|
|
|
void scheduler_init(void);
|
|
void scheduler_start(void);
|
|
|
|
status_t _user_analyze_scheduling(bigtime_t from, bigtime_t until, void* buffer,
|
|
size_t size, struct scheduling_analysis* analysis);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* KERNEL_SCHEDULER_H */
|