A computer-implemented method for diagnosing the performance of a computer system
using a diagnostic application. The method includes providing a diagnostic application
and providing an operating system (OS) kernel, the diagnostic application being
configured to execute under the OS kernel in the computer system, the OS kernel
having a kernel trap arrangement. The method also includes providing a diagnostic
monitor, the diagnostic monitor being configured to execute cooperatively with
the OS kernel, the diagnostic monitor having a monitor trap arrangement. The method
additionally includes ascertaining, using the diagnostic monitor, whether a trap
encountered during execution of the diagnostic application is to be handled by
the OS kernel or the diagnostic monitor. Furthermore, the method includes passing,
if the trap is to be handled by the OS kernel, the trap to the OS kernel for handling.