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

Correct the scope of vmtimer in UnregisteredClasses::load_class

XMLWordPrintable

    • b20

        The vmtimer in the following is not measuring anything; its scope should be expanded to measure the entire function.

        InstanceKlass* UnregisteredClasses::load_class(Symbol* name, const char* path, TRAPS) {
          assert(name != nullptr, "invariant");
          assert(DumpSharedSpaces, "this function is only used with -Xshare:dump");

          {
            PerfClassTraceTime vmtimer(ClassLoader::perf_sys_class_lookup_time(),
                                       THREAD->get_thread_stat()->perf_timers_addr(),
                                       PerfClassTraceTime::CLASS_LOAD);
          }

              ccheung Calvin Cheung
              ccheung Calvin Cheung
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: