The Octane benchmark shows a very significant performance drop with JVMTI. The JVM spends the majority of the whole CPU time in Node_Backward_Iterator::next during PhaseCFG::schedule_late when JvmtiExport::_can_access_local_variables is on (see http://cr.openjdk.java.net/~mdoerr/OctaneVTune.jpg).
You can reproduce the performance issue with http://cr.openjdk.java.net/~mdoerr/miniOctane by running openjdk_8/bin/java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n OctaneLauncher
The option "agentlib..." activates the JVMTI capability can_access_local_variables which prevents C2 from killing dead locals leading to a higher number of edges in the graph. Even without the parameter which enables can_access_local_variables the Node_Backward_Iterator::next() consumes a noticeable (but not dominant) amount of CPU time.
You can reproduce the performance issue with http://cr.openjdk.java.net/~mdoerr/miniOctane by running openjdk_8/bin/java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n OctaneLauncher
The option "agentlib..." activates the JVMTI capability can_access_local_variables which prevents C2 from killing dead locals leading to a higher number of edges in the graph. Even without the parameter which enables can_access_local_variables the Node_Backward_Iterator::next() consumes a noticeable (but not dominant) amount of CPU time.