Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
A DESCRIPTION OF THE REQUEST : If you start Java with the jdwp agent, for example using -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n you will see that the jdwp agent enables the * can_generate_exception_events capability but does not enable exception event notification until a debugger actually attaches to the socket. (This can be confirmed using the -XX:TraceJVMTI option). Yet just using the jdwp agent and not attaching the debugger still results in a large decrease in performance for applications which throw exceptions, at least for the server compiler. Note that it is not a workaround to just delay the attachment of the jdwp agent using the com.sun.tools.attach API. The jdwp agent does not have the Agent_OnAttach entry point, and even if it did, the capabilities that the jdwp agent adds can only be added at JVM initialization time. JUSTIFICATION : This is important because many applications start the JVM with the jdwp agent in case they might want to attach the debugger at some later time. This happens even in production environments and the expectation is that starting with the jdwp agent does not incur a noticeable performance penalty until the debugger attaches. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The expectation is that starting with the jdwp agent does not incur a noticeable performance penalty until the debugger attaches. ACTUAL - The actual behavior is that starting with the jdwp agent does incur a noticeable performance penalty for apps that throw exceptions even though the debugger has not attached.
|