7121373: Clean up CollectedHeap::is_in

Fixed G1CollectedHeap::is_in, added tests, cleaned up comments and made Space::is_in pure virtual.

Reviewed-by: brutisso, tonyp, jcoomes
This commit is contained in:
Stefan Karlsson 2011-12-14 12:15:26 +01:00
parent 714e978aac
commit a3943834e1
15 changed files with 54 additions and 32 deletions

View file

@ -5037,16 +5037,25 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args_) {
#ifndef PRODUCT
#include "gc_interface/collectedHeap.hpp"
#include "utilities/quickSort.hpp"
#define run_unit_test(unit_test_function_call) \
tty->print_cr("Running test: " #unit_test_function_call); \
unit_test_function_call
void execute_internal_vm_tests() {
if (ExecuteInternalVMTests) {
assert(QuickSort::test_quick_sort(), "test_quick_sort failed");
assert(arrayOopDesc::test_max_array_length(), "test_max_array_length failed");
tty->print_cr("Running internal VM tests");
run_unit_test(arrayOopDesc::test_max_array_length());
run_unit_test(CollectedHeap::test_is_in());
run_unit_test(QuickSort::test_quick_sort());
tty->print_cr("All internal VM tests passed");
}
}
#undef run_unit_test
#endif
#ifndef USDT2