comparison src/share/vm/oops/methodDataOop.hpp @ 974:26b774d693aa

Merge
author acorn
date Wed, 16 Sep 2009 09:10:57 -0400
parents 8b46c4d82093
children 89e0543e1737
comparison
equal deleted inserted replaced
973:ad6585fd4087 974:26b774d693aa
53 // 53 //
54 // The reader will find many data races in profile gathering code, starting 54 // The reader will find many data races in profile gathering code, starting
55 // with invocation counter incrementation. None of these races harm correct 55 // with invocation counter incrementation. None of these races harm correct
56 // execution of the compiled code. 56 // execution of the compiled code.
57 57
58 // forward decl
59 class ProfileData;
60
58 // DataLayout 61 // DataLayout
59 // 62 //
60 // Overlay for generic profiling data. 63 // Overlay for generic profiling data.
61 class DataLayout VALUE_OBJ_CLASS_SPEC { 64 class DataLayout VALUE_OBJ_CLASS_SPEC {
62 private: 65 private:
229 static intptr_t flag_mask_to_header_mask(int byte_constant) { 232 static intptr_t flag_mask_to_header_mask(int byte_constant) {
230 DataLayout temp; temp.set_header(0); 233 DataLayout temp; temp.set_header(0);
231 temp._header._struct._flags = byte_constant; 234 temp._header._struct._flags = byte_constant;
232 return temp._header._bits; 235 return temp._header._bits;
233 } 236 }
237
238 // GC support
239 ProfileData* data_in();
240 void follow_weak_refs(BoolObjectClosure* cl);
234 }; 241 };
235 242
236 243
237 // ProfileData class hierarchy 244 // ProfileData class hierarchy
238 class ProfileData; 245 class ProfileData;
428 // GC support 435 // GC support
429 virtual void follow_contents() {} 436 virtual void follow_contents() {}
430 virtual void oop_iterate(OopClosure* blk) {} 437 virtual void oop_iterate(OopClosure* blk) {}
431 virtual void oop_iterate_m(OopClosure* blk, MemRegion mr) {} 438 virtual void oop_iterate_m(OopClosure* blk, MemRegion mr) {}
432 virtual void adjust_pointers() {} 439 virtual void adjust_pointers() {}
440 virtual void follow_weak_refs(BoolObjectClosure* is_alive_closure) {}
433 441
434 #ifndef SERIALGC 442 #ifndef SERIALGC
435 // Parallel old support 443 // Parallel old support
436 virtual void follow_contents(ParCompactionManager* cm) {} 444 virtual void follow_contents(ParCompactionManager* cm) {}
437 virtual void update_pointers() {} 445 virtual void update_pointers() {}
665 klassOop recv = receiver_unchecked(row); 673 klassOop recv = receiver_unchecked(row);
666 assert(recv == NULL || ((oop)recv)->is_klass(), "wrong type"); 674 assert(recv == NULL || ((oop)recv)->is_klass(), "wrong type");
667 return recv; 675 return recv;
668 } 676 }
669 677
678 void set_receiver(uint row, oop p) {
679 assert((uint)row < row_limit(), "oob");
680 set_oop_at(receiver_cell_index(row), p);
681 }
682
670 uint receiver_count(uint row) { 683 uint receiver_count(uint row) {
671 assert(row < row_limit(), "oob"); 684 assert(row < row_limit(), "oob");
672 return uint_at(receiver_count_cell_index(row)); 685 return uint_at(receiver_count_cell_index(row));
686 }
687
688 void set_receiver_count(uint row, uint count) {
689 assert(row < row_limit(), "oob");
690 set_uint_at(receiver_count_cell_index(row), count);
691 }
692
693 void clear_row(uint row) {
694 assert(row < row_limit(), "oob");
695 set_receiver(row, NULL);
696 set_receiver_count(row, 0);
673 } 697 }
674 698
675 // Code generation support 699 // Code generation support
676 static ByteSize receiver_offset(uint row) { 700 static ByteSize receiver_offset(uint row) {
677 return cell_offset(receiver_cell_index(row)); 701 return cell_offset(receiver_cell_index(row));
686 // GC support 710 // GC support
687 virtual void follow_contents(); 711 virtual void follow_contents();
688 virtual void oop_iterate(OopClosure* blk); 712 virtual void oop_iterate(OopClosure* blk);
689 virtual void oop_iterate_m(OopClosure* blk, MemRegion mr); 713 virtual void oop_iterate_m(OopClosure* blk, MemRegion mr);
690 virtual void adjust_pointers(); 714 virtual void adjust_pointers();
715 virtual void follow_weak_refs(BoolObjectClosure* is_alive_closure);
691 716
692 #ifndef SERIALGC 717 #ifndef SERIALGC
693 // Parallel old support 718 // Parallel old support
694 virtual void follow_contents(ParCompactionManager* cm); 719 virtual void follow_contents(ParCompactionManager* cm);
695 virtual void update_pointers(); 720 virtual void update_pointers();