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

Turning off PerfData logging doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 24, 25
    • hotspot
    • b16

      If -XX:-UsePerfData, the perfdata variables are unintialized but logging tries to increment them and print them anyway. There's code to turn off logging that doesn't actually turn it off (last line asserts).

        if (log_is_enabled(Info, perf, class, link)) {
          if (!UsePerfData) {
            warning("Disabling -Xlog:perf+class+link since UsePerfData is turned off.");
            LogConfiguration::configure_stdout(LogLevel::Off, true, LOG_TAGS(perf, class, link));
          }
        }
        assert(UsePerfData || !log_is_enabled(Info, perf, class, link), "Did it work?");

      This causes -XX:-UsePerfData to crash in runtime/logging/RedefineClasses.java because it happens to have the -Xlog:perf+class+link option, here:

      AdapterHandlerEntry* AdapterHandlerLibrary::create_adapter(AdapterBlob*& new_adapter,
                                                                 int total_args_passed,
                                                                 BasicType* sig_bt,
                                                                 bool allocate_code_blob) {
        if (log_is_enabled(Info, perf, class, link)) {
          ClassLoader::perf_method_adapters_count()->inc();
        }


            cnorrbin Casper Norrbin
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: