harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r601731 - /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_natives.cpp
Date Thu, 06 Dec 2007 13:30:21 GMT
Author: varlax
Date: Thu Dec  6 05:30:20 2007
New Revision: 601731

URL: http://svn.apache.org/viewvc?rev=601731&view=rev
Log:
Applied HARMONY-5268 [drlvm][gc_helpers] Fix compilation of java helpers on IPF after HARMONY-5231

Modified:
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_natives.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_natives.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_natives.cpp?rev=601731&r1=601730&r2=601731&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_natives.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_natives.cpp Thu Dec  6 05:30:20 2007
@@ -58,21 +58,56 @@
     GCHelper_clss = *vm_class_ptr;
 }
 
+#if !defined(_IPF_)
+
+JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getZeroingSize(JNIEnv
*e, jclass c)
+{
+    return (jint)ZEROING_SIZE;
+}
+
 JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getPrefetchDist(JNIEnv
*e, jclass c)
 {
     return (jint)PREFETCH_DISTANCE;
 }
 
+JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getPrefetchStride(JNIEnv
*e, jclass c)
+{
+    return (jint)PREFETCH_STRIDE;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_isPrefetchEnabled(JNIEnv
*, jclass) {
+   return (jboolean) PREFETCH_ENABLED;
+}
+
+#else /* _IPF_ is defined*/
+/*
+ Alloc prefetch is disabled in GC code by default. Moreover, allocation helpers are not enabled
as well.
+ So return zeroes for prefetch distance, prefetch stride and zeroing size here. 
+ Also isPrefetchEnabled returns JNI_FALSE. These defaults should be taken into account 
+ when enabling helpers on IPF.
+*/
+
 JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getZeroingSize(JNIEnv
*e, jclass c)
 {
-    return (jint)ZEROING_SIZE;
+    return 0;
+}
+
+JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getPrefetchDist(JNIEnv
*e, jclass c)
+{
+    return 0;
 }
 
 JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getPrefetchStride(JNIEnv
*e, jclass c)
 {
-    return (jint)PREFETCH_STRIDE;
+    return 0;
 }
 
+JNIEXPORT jboolean JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_isPrefetchEnabled(JNIEnv
*, jclass) {
+   return (jboolean) JNI_FALSE;
+}
+#endif /* _IPF_ */
+
+
 JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getTlaFreeOffset(JNIEnv
*, jclass) {
     Allocator allocator;
     return (jint) ((POINTER_SIZE_INT)&allocator.free - (POINTER_SIZE_INT)&allocator);
@@ -94,10 +129,6 @@
 
 JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_getLargeObjectSize(JNIEnv
*, jclass) {
    return (jint) GC_OBJ_SIZE_THRESHOLD;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_apache_harmony_drlvm_gc_1gen_GCHelper_isPrefetchEnabled(JNIEnv
*, jclass) {
-   return (jboolean) PREFETCH_ENABLED;
 }
 
 #ifdef __cplusplus



Mime
View raw message