comparison src/share/vm/prims/whitebox.cpp @ 17778:a48e16541e6b

8035857: Add tests to verify correctness of operations with BMI1 and LZCNT instructions Reviewed-by: iveresov, kvn, iignatyev Contributed-by: filipp.zhinkin@oracle.com
author iignatyev
date Sat, 22 Mar 2014 00:26:48 +0400
parents 56cd09c4a5c9
children 4abb719c5620
comparison
equal deleted inserted replaced
17777:460f312abe11 17778:a48e16541e6b
496 if (p == NULL) { 496 if (p == NULL) {
497 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), "Failed to reserve memory"); 497 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), "Failed to reserve memory");
498 } 498 }
499 499
500 c = *p; 500 c = *p;
501 WB_END
502
503 WB_ENTRY(jstring, WB_GetCPUFeatures(JNIEnv* env, jobject o))
504 const char* cpu_features = VM_Version::cpu_features();
505 ThreadToNativeFromVM ttn(thread);
506 jstring features_string = env->NewStringUTF(cpu_features);
507
508 CHECK_JNI_EXCEPTION_(env, NULL);
509
510 return features_string;
501 WB_END 511 WB_END
502 512
503 //Some convenience methods to deal with objects from java 513 //Some convenience methods to deal with objects from java
504 int WhiteBox::offset_for_field(const char* field_name, oop object, 514 int WhiteBox::offset_for_field(const char* field_name, oop object,
505 Symbol* signature_symbol) { 515 Symbol* signature_symbol) {
609 {CC"clearMethodState", 619 {CC"clearMethodState",
610 CC"(Ljava/lang/reflect/Executable;)V", (void*)&WB_ClearMethodState}, 620 CC"(Ljava/lang/reflect/Executable;)V", (void*)&WB_ClearMethodState},
611 {CC"isInStringTable", CC"(Ljava/lang/String;)Z", (void*)&WB_IsInStringTable }, 621 {CC"isInStringTable", CC"(Ljava/lang/String;)Z", (void*)&WB_IsInStringTable },
612 {CC"fullGC", CC"()V", (void*)&WB_FullGC }, 622 {CC"fullGC", CC"()V", (void*)&WB_FullGC },
613 {CC"readReservedMemory", CC"()V", (void*)&WB_ReadReservedMemory }, 623 {CC"readReservedMemory", CC"()V", (void*)&WB_ReadReservedMemory },
624 {CC"getCPUFeatures", CC"()Ljava/lang/String;", (void*)&WB_GetCPUFeatures },
614 }; 625 };
615 626
616 #undef CC 627 #undef CC
617 628
618 JVM_ENTRY(void, JVM_RegisterWhiteBoxMethods(JNIEnv* env, jclass wbclass)) 629 JVM_ENTRY(void, JVM_RegisterWhiteBoxMethods(JNIEnv* env, jclass wbclass))