src/share/vm/runtime/arguments.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/arguments.cpp Mon Sep 17 16:13:49 2012
--- new/src/share/vm/runtime/arguments.cpp Mon Sep 17 16:13:47 2012
*** 1064,1074 ****
--- 1064,1074 ----
if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2);
}
}
! #ifndef KERNEL
! #if INCLUDE_ALTERNATE_GCS
static void disable_adaptive_size_policy(const char* collector_name) {
if (UseAdaptiveSizePolicy) {
if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
collector_name);
*** 1139,1149 ****
--- 1139,1149 ----
// unless explicitly forbidden.
if (FLAG_IS_DEFAULT(UseParNewGC)) {
FLAG_SET_ERGO(bool, UseParNewGC, true);
}
! // Turn off AdaptiveSizePolicy for CMS until it is complete.
! // Turn off AdaptiveSizePolicy by default for cms until it is complete.
disable_adaptive_size_policy("UseConcMarkSweepGC");
// In either case, adjust ParallelGCThreads and/or UseParNewGC
// as needed.
if (UseParNewGC) {
*** 1281,1291 ****
--- 1281,1291 ----
tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk",
MarkStackSize / K, MarkStackSizeMax / K);
tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
}
}
! #endif // KERNEL
! #endif // INCLUDE_ALTERNATE_GCS
void set_object_alignment() {
// Object alignment.
assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2");
MinObjAlignmentInBytes = ObjectAlignmentInBytes;
*** 1298,1311 ****
--- 1298,1311 ----
LogMinObjAlignment = LogMinObjAlignmentInBytes - LogHeapWordSize;
// Oop encoding heap max
OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes;
! #ifndef KERNEL
! #if INCLUDE_ALTERNATE_GCS
// Set CMS global values
CompactibleFreeListSpace::set_cms_values();
! #endif // KERNEL
! #endif // INCLUDE_ALTERNATE_GCS
}
bool verify_object_alignment() {
// Object alignment.
if (!is_power_of_2(ObjectAlignmentInBytes)) {
*** 2200,2214 ****
--- 2200,2214 ----
char *options = NULL;
if(pos != NULL) {
size_t len2 = strlen(pos+1) + 1; // options start after ':'. Final zero must be copied.
options = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len2, mtInternal), pos+1, len2);
}
! #ifdef JVMTI_KERNEL
! #if !INCLUDE_JVMTI
if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
! warning("profiling and debugging agents are not supported with Kernel VM");
! warning("profiling and debugging agents are not supported in this VM");
} else
! #endif // JVMTI_KERNEL
! #endif // !INCLUDE_JVMTI
add_init_library(name, options);
}
// -agentlib and -agentpath
} else if (match_option(option, "-agentlib:", &tail) ||
(is_absolute_path = match_option(option, "-agentpath:", &tail))) {
*** 2220,2243 ****
--- 2220,2247 ----
char *options = NULL;
if(pos != NULL) {
options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(pos + 1) + 1, mtInternal), pos + 1);
}
! #ifdef JVMTI_KERNEL
! #if !INCLUDE_JVMTI
if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
! warning("profiling and debugging agents are not supported with Kernel VM");
! warning("profiling and debugging agents are not supported in this VM");
} else
! #endif // JVMTI_KERNEL
! #endif // !INCLUDE_JVMTI
add_init_agent(name, options, is_absolute_path);
}
// -javaagent
} else if (match_option(option, "-javaagent:", &tail)) {
+ #if !INCLUDE_JVMTI
+ warning("Instrumentation agents are not supported in this VM");
+ #else
if(tail != NULL) {
char *options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(tail) + 1, mtInternal), tail);
add_init_agent("instrument", options, false);
}
+ #endif // !INCLUDE_JVMTI
// -Xnoclassgc
} else if (match_option(option, "-Xnoclassgc", &tail)) {
FLAG_SET_CMDLINE(bool, ClassUnloading, false);
// -Xincgc: i-CMS
} else if (match_option(option, "-Xincgc", &tail)) {
*** 2365,2380 ****
--- 2369,2384 ----
// -Xoptimize
} else if (match_option(option, "-Xoptimize", &tail)) {
// EVM option, ignore silently for compatibility
// -Xprof
} else if (match_option(option, "-Xprof", &tail)) {
! #ifndef FPROF_KERNEL
! #if INCLUDE_FPROF
_has_profile = true;
! #else // FPROF_KERNEL
! #else // INCLUDE_FPROF
// do we have to exit?
! warning("Kernel VM does not support flat profiling.");
! #endif // FPROF_KERNEL
! warning("Flat profiling is not supported in this VM.");
! #endif // INCLUDE_FPROF
// -Xaprof
} else if (match_option(option, "-Xaprof", &tail)) {
_has_alloc_profile = true;
// -Xconcurrentio
} else if (match_option(option, "-Xconcurrentio", &tail)) {
*** 2418,2427 ****
--- 2422,2434 ----
// -Xshare:dump
} else if (match_option(option, "-Xshare:dump", &tail)) {
#if defined(KERNEL)
vm_exit_during_initialization(
"Dumping a shared archive is not supported on the Kernel JVM.", NULL);
+ #elif !INCLUDE_SERVICES
+ vm_exit_during_initialization(
+ "Dumping a shared archive is not supported int this VM.", NULL);
#else
FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true);
set_mode_flags(_int); // Prevent compilation, which creates objects
#endif
// -Xshare:on
*** 2470,2480 ****
--- 2477,2491 ----
FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true);
// JNI hooks
} else if (match_option(option, "-Xcheck", &tail)) {
if (!strcmp(tail, ":jni")) {
+ #if !INCLUDE_JNI_CHECK
+ warning("JNI CHECKING is not supported in this VM");
+ #else
CheckJNICalls = true;
+ #endif // INCLUDE_JNI_CHECK
} else if (is_bad_option(option, args->ignoreUnrecognized,
"check")) {
return JNI_EINVAL;
}
} else if (match_option(option, "vfprintf", &tail)) {
*** 3025,3035 ****
--- 3036,3050 ----
if (match_option(option, "-XX:+PrintFlagsInitial", &tail)) {
CommandLineFlags::printFlags(tty, false);
vm_exit(0);
}
if (match_option(option, "-XX:NativeMemoryTracking", &tail)) {
+ #if INCLUDE_NMT
MemTracker::init_tracking_options(tail);
+ #else
+ warning("Native Memory Tracking is not supported in this VM");
+ #endif
}
#ifndef PRODUCT
if (match_option(option, "-XX:+PrintFlagsWithComments", &tail)) {
*** 3088,3097 ****
--- 3103,3127 ----
#if (defined JAVASE_EMBEDDED || defined ARM)
UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
#endif
+ #if !ALTERNATE_GCS
+ if (UseParallelGC) {
+ warning("Parallel GC is not supported in this VM. Using Serial GC.");
+ }
+ if (UseParallelOldGC) {
+ warning("Parallel Old GC is not supported in this VM. Using Serial GC.");
+ }
+ if (UseConcMarkSweepGC) {
+ warning("Concurrent Mark Sweep GC is not supported in this VM. Using Serial GC.");
+ }
+ if (UseParNewGC) {
+ warning("Par Neew GC is not supported in this VM. Using Serial GC.");
+ }
+ #endif // ALTERNATE_GCS
+
#ifndef PRODUCT
if (TraceBytecodesAt != 0) {
TraceBytecodes = true;
}
if (CountCompiledCalls) {
*** 3136,3148 ****
--- 3166,3178 ----
set_object_alignment();
#ifdef SERIALGC
force_serial_gc();
#endif // SERIALGC
! #ifdef KERNEL
! #if !INCLUDE_SERVICES
no_shared_spaces();
! #endif // KERNEL
! #endif // INCLUDE_SERVICES
// Set flags based on ergonomics.
set_ergonomics_flags();
set_shared_spaces_flags();
*** 3160,3183 ****
--- 3190,3214 ----
vm_exit_during_initialization(
"Incompatible compilation policy selected", NULL);
}
}
#ifndef KERNEL
// Set heap size based on available physical memory
set_heap_size();
+
+ #if INCLUDE_ALTERNATE_GCS
// Set per-collector flags
if (UseParallelGC || UseParallelOldGC) {
set_parallel_gc_flags();
} else if (UseConcMarkSweepGC) { // should be done before ParNew check below
set_cms_and_parnew_gc_flags();
} else if (UseParNewGC) { // skipped if CMS is set above
set_parnew_gc_flags();
} else if (UseG1GC) {
set_g1_gc_flags();
}
! #endif // KERNEL
! #endif // INCLUDE_ALTERNATE_GCS
#ifdef SERIALGC
assert(verify_serial_gc_flags(), "SerialGC unset");
#endif // SERIALGC
src/share/vm/runtime/arguments.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File