src/share/vm/code/codeBlob.hpp

Print this page
rev 4202 : 8008555: Debugging code in compiled method sometimes leaks memory
Summary: support for strings that have same life-time as code that uses them.
Reviewed-by:

*** 64,74 **** // that range. There is a similar range(s) on returns // which we don't detect. int _data_offset; // offset to where data region begins int _frame_size; // size of stack frame OopMapSet* _oop_maps; // OopMap for this CodeBlob ! CodeComments _comments; public: // Returns the space needed for CodeBlob static unsigned int allocation_size(CodeBuffer* cb, int header_size); --- 64,74 ---- // that range. There is a similar range(s) on returns // which we don't detect. int _data_offset; // offset to where data region begins int _frame_size; // size of stack frame OopMapSet* _oop_maps; // OopMap for this CodeBlob ! CodeStrings _strings; public: // Returns the space needed for CodeBlob static unsigned int allocation_size(CodeBuffer* cb, int header_size);
*** 184,199 **** static void trace_new_stub(CodeBlob* blob, const char* name1, const char* name2 = ""); // Print the comment associated with offset on stream, if there is one virtual void print_block_comment(outputStream* stream, address block_begin) const { intptr_t offset = (intptr_t)(block_begin - code_begin()); ! _comments.print_block_comment(stream, offset); } // Transfer ownership of comments to this CodeBlob ! void set_comments(CodeComments& comments) { ! _comments.assign(comments); } }; //---------------------------------------------------------------------------------------------------- --- 184,199 ---- static void trace_new_stub(CodeBlob* blob, const char* name1, const char* name2 = ""); // Print the comment associated with offset on stream, if there is one virtual void print_block_comment(outputStream* stream, address block_begin) const { intptr_t offset = (intptr_t)(block_begin - code_begin()); ! _strings.print_block_comment(stream, offset); } // Transfer ownership of comments to this CodeBlob ! void set_strings(CodeStrings& strings) { ! _strings.assign(strings); } }; //----------------------------------------------------------------------------------------------------