comparison src/share/vm/oops/cpCacheKlass.hpp @ 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 d1605aabd0a1
comparison
equal deleted inserted replaced
110:a49a647afe9a 113:ba764ed4b6f2
20 * CA 95054 USA or visit www.sun.com if you need additional information or 20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 * have any questions. 21 * have any questions.
22 * 22 *
23 */ 23 */
24 24
25 class constantPoolCacheKlass: public arrayKlass { 25 class constantPoolCacheKlass: public Klass {
26 juint _alloc_size; // allocation profiling support
26 public: 27 public:
27 // Dispatched klass operations 28 // Dispatched klass operations
28 bool oop_is_constantPoolCache() const { return true; } 29 bool oop_is_constantPoolCache() const { return true; }
29 int oop_size(oop obj) const; 30 int oop_size(oop obj) const;
30 int klass_oop_size() const { return object_size(); } 31 int klass_oop_size() const { return object_size(); }
39 assert(k->klass_part()->oop_is_constantPoolCache(), "cast to constantPoolCacheKlass"); 40 assert(k->klass_part()->oop_is_constantPoolCache(), "cast to constantPoolCacheKlass");
40 return (constantPoolCacheKlass*)k->klass_part(); 41 return (constantPoolCacheKlass*)k->klass_part();
41 } 42 }
42 43
43 // Sizing 44 // Sizing
44 static int header_size() { return oopDesc::header_size() + sizeof(constantPoolCacheKlass)/HeapWordSize; } 45 static int header_size() { return oopDesc::header_size() + sizeof(constantPoolCacheKlass)/HeapWordSize; }
45 int object_size() const { return arrayKlass::object_size(header_size()); } 46 int object_size() const { return align_object_size(header_size()); }
46 47
47 // Garbage collection 48 // Garbage collection
48 void oop_follow_contents(oop obj); 49 void oop_follow_contents(oop obj);
49 int oop_adjust_pointers(oop obj); 50 int oop_adjust_pointers(oop obj);
50 51
53 54
54 // Iterators 55 // Iterators
55 int oop_oop_iterate(oop obj, OopClosure* blk); 56 int oop_oop_iterate(oop obj, OopClosure* blk);
56 int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr); 57 int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr);
57 58
59 // Allocation profiling support
60 juint alloc_size() const { return _alloc_size; }
61 void set_alloc_size(juint n) { _alloc_size = n; }
62
58 #ifndef PRODUCT 63 #ifndef PRODUCT
59 public: 64 public:
60 // Printing 65 // Printing
61 void oop_print_on(oop obj, outputStream* st); 66 void oop_print_on(oop obj, outputStream* st);
62 #endif 67 #endif