Top


定義場所(file name)

hotspot/src/share/vm/services/management.cpp

名前(function name)

static jlong get_long_attribute(jmmLongAttribute att) {

本体部(body)

  {- -------------------------------------------
  (1) 引数で指定された種別(以下の att)に従い, 適切な関数を呼び出して, 値をリターンする.
      ---------------------------------------- -}

      switch (att) {
      case JMM_CLASS_LOADED_COUNT:
        return ClassLoadingService::loaded_class_count();

      case JMM_CLASS_UNLOADED_COUNT:
        return ClassLoadingService::unloaded_class_count();

      case JMM_THREAD_TOTAL_COUNT:
        return ThreadService::get_total_thread_count();

      case JMM_THREAD_LIVE_COUNT:
        return ThreadService::get_live_thread_count();

      case JMM_THREAD_PEAK_COUNT:
        return ThreadService::get_peak_thread_count();

      case JMM_THREAD_DAEMON_COUNT:
        return ThreadService::get_daemon_thread_count();

      case JMM_JVM_INIT_DONE_TIME_MS:
        return Management::vm_init_done_time();

      case JMM_COMPILE_TOTAL_TIME_MS:
        return Management::ticks_to_ms(CompileBroker::total_compilation_ticks());

      case JMM_OS_PROCESS_ID:
        return os::current_process_id();

      // Hotspot-specific counters
      case JMM_CLASS_LOADED_BYTES:
        return ClassLoadingService::loaded_class_bytes();

      case JMM_CLASS_UNLOADED_BYTES:
        return ClassLoadingService::unloaded_class_bytes();

      case JMM_SHARED_CLASS_LOADED_COUNT:
        return ClassLoadingService::loaded_shared_class_count();

      case JMM_SHARED_CLASS_UNLOADED_COUNT:
        return ClassLoadingService::unloaded_shared_class_count();


      case JMM_SHARED_CLASS_LOADED_BYTES:
        return ClassLoadingService::loaded_shared_class_bytes();

      case JMM_SHARED_CLASS_UNLOADED_BYTES:
        return ClassLoadingService::unloaded_shared_class_bytes();

      case JMM_TOTAL_CLASSLOAD_TIME_MS:
        return ClassLoader::classloader_time_ms();

      case JMM_VM_GLOBAL_COUNT:
        return get_num_flags();

      case JMM_SAFEPOINT_COUNT:
        return RuntimeService::safepoint_count();

      case JMM_TOTAL_SAFEPOINTSYNC_TIME_MS:
        return RuntimeService::safepoint_sync_time_ms();

      case JMM_TOTAL_STOPPED_TIME_MS:
        return RuntimeService::safepoint_time_ms();

      case JMM_TOTAL_APP_TIME_MS:
        return RuntimeService::application_time_ms();

      case JMM_VM_THREAD_COUNT:
        return get_vm_thread_count();

      case JMM_CLASS_INIT_TOTAL_COUNT:
        return ClassLoader::class_init_count();

      case JMM_CLASS_INIT_TOTAL_TIME_MS:
        return ClassLoader::class_init_time_ms();

      case JMM_CLASS_VERIFY_TOTAL_TIME_MS:
        return ClassLoader::class_verify_time_ms();

      case JMM_METHOD_DATA_SIZE_BYTES:
        return ClassLoadingService::class_method_data_size();

      case JMM_OS_MEM_TOTAL_PHYSICAL_BYTES:
        return os::physical_memory();

      default:
        return -1;
      }
    }

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