src/share/vm/memory/universe.hpp

changeset 5252
3a0774193f71
parent 5249
ce9ecec70f99
parent 5237
f2110083203d
child 5338
cedf20e2a655
     1.1 --- a/src/share/vm/memory/universe.hpp	Mon Jun 17 11:17:49 2013 +0100
     1.2 +++ b/src/share/vm/memory/universe.hpp	Wed Jun 19 11:02:10 2013 +0100
     1.3 @@ -254,19 +254,6 @@
     1.4      return m;
     1.5    }
     1.6  
     1.7 -  // Narrow Oop encoding mode:
     1.8 -  // 0 - Use 32-bits oops without encoding when
     1.9 -  //     NarrowOopHeapBaseMin + heap_size < 4Gb
    1.10 -  // 1 - Use zero based compressed oops with encoding when
    1.11 -  //     NarrowOopHeapBaseMin + heap_size < 32Gb
    1.12 -  // 2 - Use compressed oops with heap base + encoding.
    1.13 -  enum NARROW_OOP_MODE {
    1.14 -    UnscaledNarrowOop  = 0,
    1.15 -    ZeroBasedNarrowOop = 1,
    1.16 -    HeapBasedNarrowOop = 2
    1.17 -  };
    1.18 -  static char*    preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode);
    1.19 -  static char*    preferred_metaspace_base(size_t heap_size, NARROW_OOP_MODE mode);
    1.20    static void     set_narrow_oop_base(address base) {
    1.21      assert(UseCompressedOops, "no compressed oops?");
    1.22      _narrow_oop._base    = base;
    1.23 @@ -384,6 +371,21 @@
    1.24    static CollectedHeap* heap() { return _collectedHeap; }
    1.25  
    1.26    // For UseCompressedOops
    1.27 +  // Narrow Oop encoding mode:
    1.28 +  // 0 - Use 32-bits oops without encoding when
    1.29 +  //     NarrowOopHeapBaseMin + heap_size < 4Gb
    1.30 +  // 1 - Use zero based compressed oops with encoding when
    1.31 +  //     NarrowOopHeapBaseMin + heap_size < 32Gb
    1.32 +  // 2 - Use compressed oops with heap base + encoding.
    1.33 +  enum NARROW_OOP_MODE {
    1.34 +    UnscaledNarrowOop  = 0,
    1.35 +    ZeroBasedNarrowOop = 1,
    1.36 +    HeapBasedNarrowOop = 2
    1.37 +  };
    1.38 +  static NARROW_OOP_MODE narrow_oop_mode();
    1.39 +  static const char* narrow_oop_mode_to_string(NARROW_OOP_MODE mode);
    1.40 +  static char*    preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode);
    1.41 +  static char*    preferred_metaspace_base(size_t heap_size, NARROW_OOP_MODE mode);
    1.42    static address  narrow_oop_base()                       { return  _narrow_oop._base; }
    1.43    static bool  is_narrow_oop_base(void* addr)             { return (narrow_oop_base() == (address)addr); }
    1.44    static int      narrow_oop_shift()                      { return  _narrow_oop._shift; }

mercurial