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

C2-only debug build fails

XMLWordPrintable

    • b07
    • generic
    • generic

        Reported by Xin Liu (xxinliu@amazon.com).

        The C++ compiler complains attempting to compile aotCodeHeap.cpp with this configuration:

        bash ./configure --with-jvm-features=-compiler1 --enable-option-checking=fatal --with-debug-level=fastdebug

        results in

        /Users/xxinliu/Devel/openjdk/jdk/src/hotspot/share/aot/aotCodeHeap.cpp:711:59: error: no member named 'aot_code' in 'Method'
          vmassert(aot->method()->code() != aot && aot->method()->aot_code() == NULL, "method still active");
                                                   ~~~~~~~~~~~~~ ^
        /Users/xxinliu/Devel/openjdk/jdk/src/hotspot/share/utilities/debug.hpp:55:9: note: expanded from macro 'vmassert'
          if (!(p)) { \
                ^
        1 error generated.

        A possible patch is:

        diff -r 35e64b62b284 src/hotspot/share/aot/aotCodeHeap.cpp
        --- a/src/hotspot/share/aot/aotCodeHeap.cpp Tue Jul 17 17:14:03 2018 -0400
        +++ b/src/hotspot/share/aot/aotCodeHeap.cpp Tue Jul 17 15:51:11 2018 -0700
        @@ -708,7 +708,9 @@
         void AOTCodeHeap::sweep_method(AOTCompiledMethod *aot) {
           int indexes[] = {aot->method_index()};
           sweep_dependent_methods(indexes, 1);
        +#ifdef TIERED
           vmassert(aot->method()->code() != aot && aot->method()->aot_code() == NULL, "method still active");
        +#endif
         }
         
         
        diff -r 35e64b62b284 src/hotspot/share/aot/aotCompiledMethod.cpp
        --- a/src/hotspot/share/aot/aotCompiledMethod.cpp Tue Jul 17 17:14:03 2018 -0400
        +++ b/src/hotspot/share/aot/aotCompiledMethod.cpp Tue Jul 17 15:51:11 2018 -0700
        @@ -208,8 +208,9 @@
         
         bool AOTCompiledMethod::make_entrant() {
           assert(!method()->is_old(), "reviving evolved method!");
        +#ifdef TIERED
           assert(*_state_adr != not_entrant, "%s", method()->has_aot_code() ? "has_aot_code() not cleared" : "caller didn't check has_aot_code()");
        -
        +#endif
           // Make sure the method is not flushed in case of a safepoint in code below.
           methodHandle the_method(method());
           NoSafepointVerifier nsv;

              kvn Vladimir Kozlov
              phh Paul Hohensee
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: