Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4248826

Method entry/exit events are not created for empty methods in Hotspot VM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.0.1
    • 1.0
    • vm-legacy
    • 1.0.1
    • generic
    • generic
    • Not verified



        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(){}

        }


        ======================================================================

              pbk Peter Kessler
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: