diff agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents a61af66fc99e
children b9ebd46331d2
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Fri Apr 11 09:56:35 2008 -0400
+++ b/agent/src/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Sun Apr 13 17:43:42 2008 -0400
@@ -281,8 +281,11 @@
        } catch (RuntimeException re) {
           // ignore, currently java_lang_Class::hc_klass_offset is zero
        }
-
-       hcKlassField = new OopField(new NamedFieldIdentifier("hc_klass"), hcKlassOffset, true);
+       if (VM.getVM().isCompressedOopsEnabled()) {
+         hcKlassField = new NarrowOopField(new NamedFieldIdentifier("hc_klass"), hcKlassOffset, true);
+       } else {
+         hcKlassField = new OopField(new NamedFieldIdentifier("hc_klass"), hcKlassOffset, true);
+       }
     }
   }