154 JvmtiEnv* jvmti_env = JvmtiEnv::create_a_jvmti(JVMTI_VERSION);
155 jvmtiError err = jvmti_env->AddToSystemClassLoaderSearch(seg);
156 assert(err == JVMTI_ERROR_NONE, "must not fail");
157 #endif
158 }
159 WB_END
160
161 #ifdef LINUX
162 #include "utilities/elfFile.hpp"
163 #include "osContainer_linux.hpp"
164 #endif
165
166 WB_ENTRY(jlong, WB_GetCompressedOopsMaxHeapSize(JNIEnv* env, jobject o)) {
167 return (jlong)Arguments::max_heap_for_compressed_oops();
168 }
169 WB_END
170
171 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) {
172 CollectorPolicy * p = Universe::heap()->collector_policy();
173 gclog_or_tty->print_cr("Minimum heap " SIZE_FORMAT " Initial heap "
174 SIZE_FORMAT" Maximum heap " SIZE_FORMAT " Min alignment " SIZE_FORMAT " Max alignment " SIZE_FORMAT,
175 p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(),
176 p->space_alignment(), p->heap_alignment());
177 }
178 WB_END
179
180 #ifndef PRODUCT
181 // Forward declaration
182 void TestReservedSpace_test();
183 void TestReserveMemorySpecial_test();
184 void TestVirtualSpace_test();
185 void TestMetaspaceAux_test();
186 #endif
187
188 WB_ENTRY(void, WB_RunMemoryUnitTests(JNIEnv* env, jobject o))
189 #ifndef PRODUCT
190 TestReservedSpace_test();
191 TestReserveMemorySpecial_test();
192 TestVirtualSpace_test();
193 TestMetaspaceAux_test();
194 #endif
|
154 JvmtiEnv* jvmti_env = JvmtiEnv::create_a_jvmti(JVMTI_VERSION);
155 jvmtiError err = jvmti_env->AddToSystemClassLoaderSearch(seg);
156 assert(err == JVMTI_ERROR_NONE, "must not fail");
157 #endif
158 }
159 WB_END
160
161 #ifdef LINUX
162 #include "utilities/elfFile.hpp"
163 #include "osContainer_linux.hpp"
164 #endif
165
166 WB_ENTRY(jlong, WB_GetCompressedOopsMaxHeapSize(JNIEnv* env, jobject o)) {
167 return (jlong)Arguments::max_heap_for_compressed_oops();
168 }
169 WB_END
170
171 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) {
172 CollectorPolicy * p = Universe::heap()->collector_policy();
173 gclog_or_tty->print_cr("Minimum heap " SIZE_FORMAT " Initial heap "
174 SIZE_FORMAT " Maximum heap " SIZE_FORMAT " Space alignment " SIZE_FORMAT " Heap alignment " SIZE_FORMAT,
175 p->min_heap_byte_size(), p->initial_heap_byte_size(), p->max_heap_byte_size(),
176 p->space_alignment(), p->heap_alignment());
177 }
178 WB_END
179
180 #ifndef PRODUCT
181 // Forward declaration
182 void TestReservedSpace_test();
183 void TestReserveMemorySpecial_test();
184 void TestVirtualSpace_test();
185 void TestMetaspaceAux_test();
186 #endif
187
188 WB_ENTRY(void, WB_RunMemoryUnitTests(JNIEnv* env, jobject o))
189 #ifndef PRODUCT
190 TestReservedSpace_test();
191 TestReserveMemorySpecial_test();
192 TestVirtualSpace_test();
193 TestMetaspaceAux_test();
194 #endif
|