SchedCnt is a software solution that connects the LatSched kernel patch with the scheduler cycle sampler to collect data in an uncomplicated manner.
To build SchedCnt, simply input the command "gcc -o schedcnt schedcnt.c". Once it is built, the program can be used with the following parameters: "--samples" sets the size of the sample buffer, "--ttime" sets the sample time in seconds, "--sttime" sets the sample time in microseconds, "--klimit" sets the cut factor for samples, and "-- cmdpath [arg] ..." is the command to be executed with its arguments.
The output of SchedCnt provides information for each CPU, including the CPU number, number of read samples, average schedule() cycles, ChiSquare of the CSCH distribution, and average schedule() cycles that exceed the cut factor set by "--klimit". Each sample is of the form: CENT CEXT CSCH PPID RTIM, where CENT represents the cycle counter at schedule() entry, CEXT represents the cycle counter at schedule() exit, CSCH represents the cycle duration of schedule(), PPID represents the new scheduled PID, and RTIM represents the cycles run time (which may sometimes be incorrect due to schedule() nesting).
In conclusion, SchedCnt offers a simple yet informative interface for the LatSched kernel patch and is an excellent example for those who desire to learn more about the LatSched kernel patch.
Version 0.19: N/A