A system and method for detecting phases in a running computer program,
creates an activation count associated with each stack frame. The
activation count is zeroed whenever a new frame is created in a stack and
incremented for each frame encountered during periodic intervals. A phase
is detected with an activation whose activation count is non-zero.