src/share/vm/runtime/stubCodeGenerator.cpp
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:
*** 85,95 ****
StubCodeGenerator::~StubCodeGenerator() {
if (PrintStubCode || _print_code) {
CodeBuffer* cbuf = _masm->code();
CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start());
if (blob != NULL) {
! blob->set_comments(cbuf->comments());
}
bool saw_first = false;
StubCodeDesc* toprint[1000];
int toprint_len = 0;
for (StubCodeDesc* cdesc = _last_stub; cdesc != NULL; cdesc = cdesc->_next) {
--- 85,95 ----
StubCodeGenerator::~StubCodeGenerator() {
if (PrintStubCode || _print_code) {
CodeBuffer* cbuf = _masm->code();
CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start());
if (blob != NULL) {
! blob->set_strings(cbuf->strings());
}
bool saw_first = false;
StubCodeDesc* toprint[1000];
int toprint_len = 0;
for (StubCodeDesc* cdesc = _last_stub; cdesc != NULL; cdesc = cdesc->_next) {