Check the usage of LOG_PLEASE

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 25
    • Component/s: hotspot
    • None
    • b13
    • generic
    • generic

      Seen discussion in https://github.com/openjdk/jdk/pull/23290#issuecomment-2678001782. The LOG_PLEASE macro seems currently being defined are debugging leftovers that shouldn't have been committed. It's definition is typically
      commented or uncommented to provide some additional logging for some tests of interest.

      Below configure and make command will report compile error:
      bash configure --with-gtest=/home/yansendao/git/googletest-v1.14.x --with-extra-cflags="-DLOG_PLEASE" --with-extra-cxxflags="-DLOG_PLEASE" --with-debug-level=fastdebug
      time make CONF=linux-x86_64-server-fastdebug LOG=debug images test-image &> build/make.log

      Log snippet:
      * For target hotspot_variant-server_libjvm_gtest_objs_test_clms.o:
      /home/yansendao/git/jdk/test/hotspot/gtest/metaspace/test_clms.cpp:41:9: error: "LOG_PLEASE" redefined [-Werror]
         41 | #define LOG_PLEASE
            | ^~~~~~~~~~
      <command-line>: note: this is the location of the previous definition
      cc1plus: all warnings being treated as errors
      * For target hotspot_variant-server_libjvm_gtest_objs_test_metaspacearena.o:
      /home/yansendao/git/jdk/test/hotspot/gtest/metaspace/test_metaspacearena.cpp:43:9: error: "LOG_PLEASE" redefined [-Werror]
         43 | #define LOG_PLEASE
            | ^~~~~~~~~~
      <command-line>: note: this is the location of the previous definition
      cc1plus: all warnings being treated as errors
      * For target hotspot_variant-server_libjvm_gtest_objs_test_os_reserve_between.o:
      /home/yansendao/git/jdk/test/hotspot/gtest/runtime/test_os_reserve_between.cpp:33:9: error: "LOG_PLEASE" redefined [-Werror]
         33 | #define LOG_PLEASE
            | ^~~~~~~~~~
      <command-line>: note: this is the location of the previous definition
      cc1plus: all warnings being treated as errors

      > grep -E '^[^//].*LOG_PLEASE' src/ test/ -rn
      test/hotspot/gtest/testutils.hpp:65:#ifdef LOG_PLEASE
      test/hotspot/gtest/runtime/test_os_reserve_between.cpp:33:#define LOG_PLEASE
      test/hotspot/gtest/metaspace/test_metaspacearena.cpp:43:#define LOG_PLEASE
      test/hotspot/gtest/metaspace/test_clms.cpp:41:#define LOG_PLEASE
      test/hotspot/gtest/metaspace/metaspaceGtestCommon.hpp:166:#ifdef LOG_PLEASE

            Assignee:
            Sendao Yan
            Reporter:
            Sendao Yan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: