mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8053995: Add method to WhiteBox to get vm pagesize
Unsafe is not recommended and may deprecated in future. Added a WhiteBox API to get VM page size. Reviewed-by: dholmes, ccheung, mseledtsov
This commit is contained in:
parent
5ffd65a731
commit
d620b54c63
3 changed files with 51 additions and 0 deletions
|
@ -82,6 +82,9 @@ WB_ENTRY(jint, WB_GetHeapOopSize(JNIEnv* env, jobject o))
|
|||
return heapOopSize;
|
||||
WB_END
|
||||
|
||||
WB_ENTRY(jint, WB_GetVMPageSize(JNIEnv* env, jobject o))
|
||||
return os::vm_page_size();
|
||||
WB_END
|
||||
|
||||
class WBIsKlassAliveClosure : public KlassClosure {
|
||||
Symbol* _name;
|
||||
|
@ -1121,6 +1124,7 @@ static JNINativeMethod methods[] = {
|
|||
{CC"getObjectSize", CC"(Ljava/lang/Object;)J", (void*)&WB_GetObjectSize },
|
||||
{CC"isObjectInOldGen", CC"(Ljava/lang/Object;)Z", (void*)&WB_isObjectInOldGen },
|
||||
{CC"getHeapOopSize", CC"()I", (void*)&WB_GetHeapOopSize },
|
||||
{CC"getVMPageSize", CC"()I", (void*)&WB_GetVMPageSize },
|
||||
{CC"isClassAlive0", CC"(Ljava/lang/String;)Z", (void*)&WB_IsClassAlive },
|
||||
{CC"parseCommandLine",
|
||||
CC"(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue