Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/arguments.hpp @ 20403:8ec8971f511a
8057531: refactor gc argument processing code slightly
Reviewed-by: mgerdin, tschatzl, jmasa
author | jcoomes |
---|---|
date | Thu, 04 Sep 2014 16:53:27 -0700 |
parents | 7430aa5718a5 |
children | 76af788b6c16 |
comparison
equal
deleted
inserted
replaced
20402:1202792c966e | 20403:8ec8971f511a |
---|---|
336 static void set_g1_gc_flags(); | 336 static void set_g1_gc_flags(); |
337 // GC ergonomics | 337 // GC ergonomics |
338 static void set_conservative_max_heap_alignment(); | 338 static void set_conservative_max_heap_alignment(); |
339 static void set_use_compressed_oops(); | 339 static void set_use_compressed_oops(); |
340 static void set_use_compressed_klass_ptrs(); | 340 static void set_use_compressed_klass_ptrs(); |
341 static void select_gc(); | |
341 static void set_ergonomics_flags(); | 342 static void set_ergonomics_flags(); |
342 static void set_shared_spaces_flags(); | 343 static void set_shared_spaces_flags(); |
344 static void set_gc_specific_flags(); | |
343 // limits the given memory size by the maximum amount of memory this process is | 345 // limits the given memory size by the maximum amount of memory this process is |
344 // currently allowed to allocate or reserve. | 346 // currently allowed to allocate or reserve. |
345 static julong limit_by_allocatable_memory(julong size); | 347 static julong limit_by_allocatable_memory(julong size); |
346 // Setup heap size | 348 // Setup heap size |
347 static void set_heap_size(); | 349 static void set_heap_size(); |
449 // Apply ergonomics | 451 // Apply ergonomics |
450 static jint apply_ergo(); | 452 static jint apply_ergo(); |
451 // Adjusts the arguments after the OS have adjusted the arguments | 453 // Adjusts the arguments after the OS have adjusted the arguments |
452 static jint adjust_after_os(); | 454 static jint adjust_after_os(); |
453 | 455 |
456 static inline bool gc_selected(); // whether a gc has been selected | |
457 static void select_gc_ergonomically(); | |
458 | |
454 // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error | 459 // Verifies that the given value will fit as a MinHeapFreeRatio. If not, an error |
455 // message is returned in the provided buffer. | 460 // message is returned in the provided buffer. |
456 static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio); | 461 static bool verify_MinHeapFreeRatio(FormatBuffer<80>& err_msg, uintx min_heap_free_ratio); |
457 | 462 |
458 // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error | 463 // Verifies that the given value will fit as a MaxHeapFreeRatio. If not, an error |
600 | 605 |
601 // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid. | 606 // Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid. |
602 static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen); | 607 static bool copy_expand_pid(const char* src, size_t srclen, char* buf, size_t buflen); |
603 }; | 608 }; |
604 | 609 |
610 bool Arguments::gc_selected() { | |
611 return UseConcMarkSweepGC || UseG1GC || UseParallelGC || UseParallelOldGC || | |
612 UseParNewGC || UseSerialGC; | |
613 } | |
605 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP | 614 #endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP |