Patent ID: 7707556

Claim:
A method for measuring system performance using a soaker thread of a software utility application, wherein the soaker thread prevents execution of an idle loop during a sampling period, wherein the idle loop is a default process that executes only when there are no other processes requiring execution, and wherein execution the idle loop interferes with an accuracy of a statistic tracked by a hardware kernel counter during the sampling period, the method comprising: binding a sampling thread of the software utility application to a processor comprising the hardware kernel counter; starting the soaker thread of the software utility application, binding the soaker thread to the processor, and assigning the soaker thread a first priority; signaling, using the sampling thread, the soaker thread to suspend; initializing the hardware kernel counter for the sampling period using the sampling thread; signaling, using the sampling thread, the soaker thread to resume after initializing the hardware kernel counter; executing the soaker thread during the sampling period to avoid execution of the idle loop, wherein the soaker thread executes before the idle loop, and wherein executing the soaker thread prevents execution of the idle loop; interrupting execution of the soaker thread to execute an operating system thread during the sampling period, wherein the operating system thread comprises a second priority exceeding the first priority, and wherein the hardware kernel counter tracks the statistic corresponding to at least the execution of the operating system thread; executing the soaker thread after execution of the operating system thread is complete to avoid execution of the idle loop, wherein execution of the idle loop offsets the statistic tracked by the hardware kernel counter, and wherein the operating system thread completes execution prior to completion of the sampling period; collecting, using the sampling thread, the statistic tracked by the hardware kernel counter; and suspending the soaker thread after completion of the sampling period by signaling the soaker thread using the sampling thread.