For identification of start and stop of threads, an instrumentation of the class java.lang.Thread was done. We used the freely available source code edition [#!java2cs!#] of the JVM for this purpose. Essentially, the method start of java.lang.Thread was instrumented to call addControlFlow whenever a new thread is started. As start is executed in the initiating thread, a correlation can easily be achieved.
Similarly, the method exit from java.lang.Thread, which is executed by the system whenever a thread ends, was instrumented to inform the measurement correlator via a call to removeControlFlow.