Top


定義場所(file name)

hotspot/src/share/vm/classfile/classLoader.cpp

説明(description)

// Please keep following two functions at end of this file. With them placed at top or in middle of the file,
// they could get inlined by agressive compiler, an unknown trick, see bug 6966589.

名前(function name)

void PerfClassTraceTime::initialize() {

本体部(body)

      if (!UsePerfData) return;

      if (_eventp != NULL) {
        // increment the event counter
        _eventp->inc();
      }

      // stop the current active thread-local timer to measure inclusive time
      _prev_active_event = -1;
      for (int i=0; i < EVENT_TYPE_COUNT; i++) {
         if (_timers[i].is_active()) {
           assert(_prev_active_event == -1, "should have only one active timer");
           _prev_active_event = i;
           _timers[i].stop();
         }
      }

      if (_recursion_counters == NULL || (_recursion_counters[_event_type])++ == 0) {
        // start the inclusive timer if not recursively called
        _t.start();
      }

      // start thread-local timer of the given event type
       if (!_timers[_event_type].is_active()) {
        _timers[_event_type].start();
      }
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.