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

-Djava.compiler=NONE and -Xdebug anachronisms unanachronistically disable full-speed debugging

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs11
    • 5.0, 6, 6u2
    • hotspot
    • 6
    • b01
    • generic, x86
    • generic, windows_xp
    • Not verified

        The following test case fails pretty much on all the platforms during
        > our nightly runs
        >
        > Test Case : nsk/regression/b4516835
        >
        > Since the tlog file indicates the dependency on "JVMDI", I was wondering
        > if this is a supported test case
        >
        > #==> nsk/regression/b4516835 test LOG:
        > #--> This test for #4516835 bug; Category: hotspot; Subcategory: jvmdi
        > # Synopsis: JVMDI: -Djava.compiler=NONE anachronism disables
        > full-speed debugging

        ------------------------------------------------------

        I've looked in the ancient bug report which regressed, and have learned that the 1.3 JPDA front-ends the back-end was launched with this pair of options. This mean if someone used a debugger built on a 1.3 JDK to debug a program running on a Mustang VM then they wouldn't get full-speed debugging. Clearly that was a bigger deal during the dvelopment of 1.4 which is when the original bug 4516835 was created.

        From what I can see we never spec'ed the interaction between these flags (at least not externally), so we have not broken any contracts. This twistedly arcane behavior can be restored, if anyone cares, by adding a global flag. In either case, the code/comments at arguments.cpp:1998 that implements this needs to be dealt with:

              // This must be done after all arguments have been processed.
              // java_compiler() true means set to "NONE" or empty.
              // The -Xdebug mini-agent sets the breakpoint capability (amongst many).
              if (java_compiler() && !JvmtiExport::can_post_breakpoint()) {
                // For backwards compatibility, we switch to interpreted mode if
                // -Djava.compiler="NONE" or "" is specified AND "-Xdebug" was
                // not specified.
                set_mode_flags(_int);
              }

        ###@###.### 2005-05-18 02:23:57 GMT
        ###@###.### 2005-05-18 02:36:19 GMT

        This bug affects the following NSK test:

            nsk/regression/b4516835

        ###@###.### 2005-05-25 19:28:37 GMT
        Please, see the description of the main CR.
        Please, note that the 6u2 should match the JDK 5 behavior to fix the interoperability issue.

              jjh James Holmlund (Inactive)
              rfield Robert Field (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: