Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2027706 | 1.3.0 | Peter Kessler | P3 | Resolved | Fixed | beta |
Name: rrC79099 Date: 06/23/99
In Classic VM the method entry and exit events are created for both methods with and without any statements.
But in Hotspot VM method entry and exit events are not created for empty methods .
The details of testing in Hotspot VM with and without any statements inside a method are given below.
Hotspot VM: Method with statements
-------------------------------------
[C:/Reports/Bugs/MeMxbug/classes] jdb Test
Initializing jdb...
> stop at Test:9
Deferring breakpoint Test:9.
It will be set after the class is loaded.
> run
run Test
HotSpot VM warning: Setting of property "java.compiler" is ignored
>
VM Started: Set deferred breakpoint request Test:9
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
main[1] trace methods
main[1] cont
main[1]
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
main[1] cont
main[1] In the loop
Method Entered: Test.entryMethod thread="main", Test.entryMethod(), line=16, bci
=0
main[1] cont
main[1] method entered
Method Exited: Test.entryMethod thread="main", Test.entryMethod(), line=15, bci=
8
main[1] cont
main[1]
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
...
Hotspot VM: Empty method:
-------------------------------
[C:/Reports/Bugs/MeMxbug/classes] jdb Test
Initializing jdb...
> stop at Test:9
Deferring breakpoint Test:9.
It will be set after the class is loaded.
> run
run Test
HotSpot VM warning: Setting of property "java.compiler" is ignored
>
VM Started: Set deferred breakpoint request Test:9
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
main[1] trace methods
main[1] cont
main[1]
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
main[1] cont
main[1] In the loop
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
main[1] cont
main[1] In the loop
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
main[1] cont
main[1] In the loop
Breakpoint hit: thread="main", Test.main(), line=9, bci=5
...
Steps to reproduce the bug:
---------------------------
1. Set path to the bin directory in JPDA rc1 build.
2. Compile the attached Test.java
3. Start jdb - (jdb Test)
4. Set breakpoint for the println statement in for loop.
5. Trace methods.
Test.java
------------
public class Test
{
public static void main(String args[])
{
for(int i=0;i<100;i++)
{
System.out.println(" In the loop");
entryMethod();
}
}
public static void entryMethod(){}
}
======================================================================
- backported by
-
JDK-2027706 Method entry/exit events are not created for empty methods in Hotspot VM
-
- Resolved
-
- relates to
-
JDK-4289162 Application is running to completion for a break point in Empty Method
-
- Closed
-
-
JDK-6494989 Breakpoints in empty finalizer methods treated incorrectly
-
- Closed
-