src/share/vm/compiler/oopMap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/compiler/oopMap.hpp

src/share/vm/compiler/oopMap.hpp

Print this page

        

*** 143,163 **** friend class OopMapStream; friend class VMStructs; private: int _pc_offset; int _omv_count; - int _omv_data_size; - unsigned char* _omv_data; CompressedWriteStream* _write_stream; debug_only( OopMapValue::oop_types* _locs_used; int _locs_length;) // Accessors - unsigned char* omv_data() const { return _omv_data; } - void set_omv_data(unsigned char* value) { _omv_data = value; } - int omv_data_size() const { return _omv_data_size; } - void set_omv_data_size(int value) { _omv_data_size = value; } int omv_count() const { return _omv_count; } void set_omv_count(int value) { _omv_count = value; } void increment_count() { _omv_count++; } CompressedWriteStream* write_stream() const { return _write_stream; } void set_write_stream(CompressedWriteStream* value) { _write_stream = value; } --- 143,157 ----
*** 170,179 **** --- 164,176 ---- OopMap(int frame_size, int arg_count); // pc-offset handling int offset() const { return _pc_offset; } void set_offset(int o) { _pc_offset = o; } + int count() const { return _omv_count; } + int data_size() const { return write_stream()->position(); } + address data() const { return write_stream()->buffer(); } // Check to avoid double insertion debug_only(OopMapValue::oop_types locs_used( int indx ) { return _locs_used[indx]; }) // Construction
*** 186,207 **** void set_callee_saved( VMReg local, VMReg caller_machine_register ); void set_derived_oop ( VMReg local, VMReg derived_from_local_register ); void set_xxx(VMReg reg, OopMapValue::oop_types x, VMReg optional); int heap_size() const; ! void copy_to(address addr); OopMap* deep_copy(); - bool has_derived_pointer() const PRODUCT_RETURN0; - bool legal_vm_reg_name(VMReg local) { return OopMapValue::legal_vm_reg_name(local); } // Printing void print_on(outputStream* st) const; void print() const { print_on(tty); } }; class OopMapSet : public ResourceObj { friend class VMStructs; --- 183,203 ---- void set_callee_saved( VMReg local, VMReg caller_machine_register ); void set_derived_oop ( VMReg local, VMReg derived_from_local_register ); void set_xxx(VMReg reg, OopMapValue::oop_types x, VMReg optional); int heap_size() const; ! void copy_data_to(address addr) const; OopMap* deep_copy(); bool legal_vm_reg_name(VMReg local) { return OopMapValue::legal_vm_reg_name(local); } // Printing void print_on(outputStream* st) const; void print() const { print_on(tty); } + bool equals(const OopMap* other) const; }; class OopMapSet : public ResourceObj { friend class VMStructs;
*** 237,247 **** // returns OopMap in that is anchored to the pc OopMap* find_map_at_offset(int pc_offset) const; int heap_size() const; - void copy_to(address addr); // Methods oops_do() and all_do() filter out NULL oops and // oop == Universe::narrow_oop_base() before passing oops // to closures. --- 233,242 ----
*** 259,268 **** --- 254,333 ---- // Printing void print_on(outputStream* st) const; void print() const { print_on(tty); } }; + class ImmutableOopMapBuilder; + + class ImmutableOopMap { + friend class OopMapStream; + friend class VMStructs; + friend class ImmutableOopMapBuilder; + private: + int _count; + address data_addr() const { return (address) this + sizeof(ImmutableOopMap); } + public: + ImmutableOopMap(const OopMap* oopmap); + + bool has_derived_pointer() const PRODUCT_RETURN0; + int count() const { return _count; } + + // Printing + void print_on(outputStream* st) const; + void print() const { print_on(tty); } + }; + + class ImmutableOopMapSet; + class ImmutableOopMap; + class OopMapSet; + + class ImmutableOopMapPair { + friend class VMStructs; + private: + int _pc; + int _offset; + public: + ImmutableOopMapPair(int pc, int offset) : _pc(pc), _offset(offset) { + assert(pc >= 0 && offset >= 0, "check"); + } + const ImmutableOopMap* get_from(const ImmutableOopMapSet* set) const; + + int pc() const { return _pc; } + int offset() const { return _offset; } + }; + + class ImmutableOopMapSet { + friend class VMStructs; + private: + int _count; + int _size; + + address data() const { return (address) this + sizeof(*this) + sizeof(ImmutableOopMapPair) * _count; } + + public: + ImmutableOopMapSet(const OopMapSet* oopmap_set, int size) : _count(oopmap_set->size()), _size(size) {} + + ImmutableOopMap* oopmap_at_offset(int offset) const { + assert(offset >= 0 && offset < _size, "must be within boundaries"); + address addr = data() + offset; + return (ImmutableOopMap*) addr; + } + + ImmutableOopMapPair* get_pairs() const { return (ImmutableOopMapPair*) ((address) this + sizeof(*this)); } + + static ImmutableOopMapSet* build_from(const OopMapSet* oopmap_set); + + const ImmutableOopMap* find_map_at_offset(int pc_offset) const; + + const ImmutableOopMapPair* pair_at(int index) const { assert(index >= 0 && index < _count, "check"); return &get_pairs()[index]; } + + int count() const { return _count; } + int size() const { return _size; } + + void print_on(outputStream* st) const; + void print() const { print_on(tty); } + }; class OopMapStream : public StackObj { private: CompressedReadStream* _stream; int _mask;
*** 271,282 **** bool _valid_omv; OopMapValue _omv; void find_next(); public: ! OopMapStream(OopMap* oop_map); ! OopMapStream(OopMap* oop_map, int oop_types_mask); bool is_done() { if(!_valid_omv) { find_next(); } return !_valid_omv; } void next() { find_next(); } OopMapValue current() { return _omv; } }; --- 336,347 ---- bool _valid_omv; OopMapValue _omv; void find_next(); public: ! OopMapStream(OopMap* oop_map, int oop_types_mask = OopMapValue::type_mask_in_place); ! OopMapStream(const ImmutableOopMap* oop_map, int oop_types_mask = OopMapValue::type_mask_in_place); bool is_done() { if(!_valid_omv) { find_next(); } return !_valid_omv; } void next() { find_next(); } OopMapValue current() { return _omv; } };
src/share/vm/compiler/oopMap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File