hotspot/src/share/vm/oops/constantPoolKlass.hpp
changeset 360 21d113ecbf6a
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
equal deleted inserted replaced
357:f4edb0d9f109 360:21d113ecbf6a
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 // A constantPoolKlass is the klass of a constantPoolOop
    25 // A constantPoolKlass is the klass of a constantPoolOop
    26 
    26 
    27 class constantPoolKlass : public arrayKlass {
    27 class constantPoolKlass : public Klass {
       
    28   juint    _alloc_size;        // allocation profiling support
    28  public:
    29  public:
    29   // Dispatched klass operations
    30   // Dispatched klass operations
    30   bool oop_is_constantPool() const  { return true; }
    31   bool oop_is_constantPool() const  { return true; }
    31   int oop_size(oop obj) const;
    32   int oop_size(oop obj) const;
    32   int klass_oop_size() const        { return object_size(); }
    33   int klass_oop_size() const        { return object_size(); }
    42     return (constantPoolKlass*) k->klass_part();
    43     return (constantPoolKlass*) k->klass_part();
    43   }
    44   }
    44 
    45 
    45   // Sizing
    46   // Sizing
    46   static int header_size()        { return oopDesc::header_size() + sizeof(constantPoolKlass)/HeapWordSize; }
    47   static int header_size()        { return oopDesc::header_size() + sizeof(constantPoolKlass)/HeapWordSize; }
    47   int object_size() const         { return arrayKlass::object_size(header_size()); }
    48   int object_size() const        { return align_object_size(header_size()); }
    48 
    49 
    49   // Garbage collection
    50   // Garbage collection
    50   void oop_follow_contents(oop obj);
    51   void oop_follow_contents(oop obj);
    51   int oop_adjust_pointers(oop obj);
    52   int oop_adjust_pointers(oop obj);
    52 
    53 
    54   PARALLEL_GC_DECLS
    55   PARALLEL_GC_DECLS
    55 
    56 
    56   // Iterators
    57   // Iterators
    57   int oop_oop_iterate(oop obj, OopClosure* blk);
    58   int oop_oop_iterate(oop obj, OopClosure* blk);
    58   int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr);
    59   int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr);
       
    60 
       
    61   // Allocation profiling support
       
    62   // no idea why this is pure virtual and not in Klass ???
       
    63   juint alloc_size() const              { return _alloc_size; }
       
    64   void set_alloc_size(juint n)          { _alloc_size = n; }
    59 
    65 
    60 #ifndef PRODUCT
    66 #ifndef PRODUCT
    61  public:
    67  public:
    62   // Printing
    68   // Printing
    63   void oop_print_on(oop obj, outputStream* st);
    69   void oop_print_on(oop obj, outputStream* st);