Mercurial > hg > graal-jvmci-8
diff src/share/vm/asm/assembler.cpp @ 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 | d02120b7a34f |
children | 746b070f5022 |
line wrap: on
line diff
--- a/src/share/vm/asm/assembler.cpp Sat Mar 16 21:44:52 2013 -0700 +++ b/src/share/vm/asm/assembler.cpp Mon Mar 18 13:19:06 2013 +0100 @@ -284,15 +284,19 @@ DelayedConstant::update_all(); } - - - void AbstractAssembler::block_comment(const char* comment) { if (sect() == CodeBuffer::SECT_INSTS) { code_section()->outer()->block_comment(offset(), comment); } } +const char* AbstractAssembler::code_string(const char* str) { + if (sect() == CodeBuffer::SECT_INSTS || sect() == CodeBuffer::SECT_STUBS) { + return code_section()->outer()->code_string(str); + } + return NULL; +} + bool MacroAssembler::needs_explicit_null_check(intptr_t offset) { // Exception handler checks the nmethod's implicit null checks table // only when this method returns false.