--- old/src/share/vm/services/management.cpp 2012-09-21 10:50:00.302261007 -0400 +++ new/src/share/vm/services/management.cpp 2012-09-21 10:49:59.609669993 -0400 @@ -72,12 +72,22 @@ TimeStamp Management::_stamp; void management_init() { +#if INCLUDE_MANAGEMENT Management::init(); ThreadService::init(); RuntimeService::init(); ClassLoadingService::init(); +#else + ThreadService::init(); + // Make sure the VM version is initialized + // This is normally called by RuntimeService::init(). + // Since that is conditionalized out, we need to call it here. + Abstract_VM_Version::initialize(); +#endif // INCLUDE_MANAGEMENT } +#if INCLUDE_MANAGEMENT + void Management::init() { EXCEPTION_MARK; @@ -112,10 +122,10 @@ _optional_support.isBootClassPathSupported = 1; _optional_support.isObjectMonitorUsageSupported = 1; -#ifndef SERVICES_KERNEL +#if INCLUDE_SERVICES // This depends on the heap inspector _optional_support.isSynchronizerUsageSupported = 1; -#endif // SERVICES_KERNEL +#endif // INCLUDE_SERVICES _optional_support.isThreadAllocatedMemorySupported = 1; // Registration of the diagnostic commands @@ -2086,7 +2096,7 @@ // Dump heap - Returns 0 if succeeds. JVM_ENTRY(jint, jmm_DumpHeap0(JNIEnv *env, jstring outputfile, jboolean live)) -#ifndef SERVICES_KERNEL +#if INCLUDE_SERVICES ResourceMark rm(THREAD); oop on = JNIHandles::resolve_external_guard(outputfile); if (on == NULL) { @@ -2104,9 +2114,9 @@ THROW_MSG_(vmSymbols::java_io_IOException(), errmsg, -1); } return 0; -#else // SERVICES_KERNEL +#else // INCLUDE_SERVICES return -1; -#endif // SERVICES_KERNEL +#endif // INCLUDE_SERVICES JVM_END JVM_ENTRY(jobjectArray, jmm_GetDiagnosticCommands(JNIEnv *env)) @@ -2273,10 +2283,13 @@ jmm_GetDiagnosticCommandArgumentsInfo, jmm_ExecuteDiagnosticCommand }; +#endif // INCLUDE_MANAGEMENT void* Management::get_jmm_interface(int version) { +#if INCLUDE_MANAGEMENT if (version == JMM_VERSION_1_0) { return (void*) &jmm_interface; } +#endif // INCLUDE_MANAGEMENT return NULL; }