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

GetCallTrace doesn't return correct info when sampler thread priority is TIME_CR

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.3.1
    • 1.3.1
    • vm-legacy
    • None
    • rc1
    • generic
    • generic
    • Not verified

            On Windows, the problem is a bit less frequent with b19. The test program I gave
        you last time worked but OptimizeIt results were still wrong. I end up changing the
        test program to look more like our real sampler. The main difference was raising the
        sampler thread priority to TIME_CRITICAL. After doing this the problem became again
        visible. The new windows test program is included with this email.

        e:/TEMP/GetCallTraceBugWindows>e:/jdk1.3.1b18/bin/java -Xrunsampler SamplerTest
        2 0 Running 1s
        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Waiting 1s
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

        In the provided test, a "0" printed means that GetCallTrace returns an
        empty call trace. This cannot happen given the test Java program.


        On Solaris the GetCallTrace issue is still present. I have ported the little test
        program
        to Solaris. You'll find it including source code and Makefile in
        GetCallTraceBug.tar.gz
        Here is what I get:

        \H-/tmp/GetCallTraceBug: ls
        #Makefile# SamplerTest.c libSamplerTest.so sampler.o
        CVS SamplerTest.class libsampler.so
        Makefile SamplerTest.java sampler.c
        Makefile.solaris SamplerTest.o sampler.h
        \H-/tmp/GetCallTraceBug: /users/arnaud/j2sdk1_3_1_b18/j2sdk1_3_1/bin/java
        -Xrunsampler Sam
        plerTest
        Running 1s
        3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Waiting 1s
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 Running 1s
        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Waiting 1s
        4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 Running 1s
        0 0 0 0 0 0 0 0 0 0 0 ^C
        \H-/tmp/GetCallTraceBug:

        Again, in the provided test, a "0" printed means that GetCallTrace returns an
        empty call trace. This cannot happen given the test Java program.

              acorn Karen Kinnear (Inactive)
              jkoenigsunw Janet Koenig (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: