Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/codeBlob.hpp @ 8767:a5de0cc2f91c
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: kvn, twisti
author | roland |
---|---|
date | Mon, 18 Mar 2013 13:19:06 +0100 |
parents | b31471cdc53e |
children | b9a918201d47 9758d9f36299 |
comparison
equal
deleted
inserted
replaced
8765:592f9722c72e | 8767:a5de0cc2f91c |
---|---|
64 // that range. There is a similar range(s) on returns | 64 // that range. There is a similar range(s) on returns |
65 // which we don't detect. | 65 // which we don't detect. |
66 int _data_offset; // offset to where data region begins | 66 int _data_offset; // offset to where data region begins |
67 int _frame_size; // size of stack frame | 67 int _frame_size; // size of stack frame |
68 OopMapSet* _oop_maps; // OopMap for this CodeBlob | 68 OopMapSet* _oop_maps; // OopMap for this CodeBlob |
69 CodeComments _comments; | 69 CodeStrings _strings; |
70 | 70 |
71 public: | 71 public: |
72 // Returns the space needed for CodeBlob | 72 // Returns the space needed for CodeBlob |
73 static unsigned int allocation_size(CodeBuffer* cb, int header_size); | 73 static unsigned int allocation_size(CodeBuffer* cb, int header_size); |
74 | 74 |
184 static void trace_new_stub(CodeBlob* blob, const char* name1, const char* name2 = ""); | 184 static void trace_new_stub(CodeBlob* blob, const char* name1, const char* name2 = ""); |
185 | 185 |
186 // Print the comment associated with offset on stream, if there is one | 186 // Print the comment associated with offset on stream, if there is one |
187 virtual void print_block_comment(outputStream* stream, address block_begin) const { | 187 virtual void print_block_comment(outputStream* stream, address block_begin) const { |
188 intptr_t offset = (intptr_t)(block_begin - code_begin()); | 188 intptr_t offset = (intptr_t)(block_begin - code_begin()); |
189 _comments.print_block_comment(stream, offset); | 189 _strings.print_block_comment(stream, offset); |
190 } | 190 } |
191 | 191 |
192 // Transfer ownership of comments to this CodeBlob | 192 // Transfer ownership of comments to this CodeBlob |
193 void set_comments(CodeComments& comments) { | 193 void set_strings(CodeStrings& strings) { |
194 _comments.assign(comments); | 194 _strings.assign(strings); |
195 } | 195 } |
196 }; | 196 }; |
197 | 197 |
198 | 198 |
199 //---------------------------------------------------------------------------------------------------- | 199 //---------------------------------------------------------------------------------------------------- |