Turning off PerfData logging doesn't work

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: 24, 25
    • Component/s: 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();
        }


            Assignee:
            Casper Norrbin
            Reporter:
            Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: