comparison src/share/vm/runtime/stubCodeGenerator.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 cd3d6a6b95d9
children de6a9e811145
comparison
equal deleted inserted replaced
8765:592f9722c72e 8767:a5de0cc2f91c
85 StubCodeGenerator::~StubCodeGenerator() { 85 StubCodeGenerator::~StubCodeGenerator() {
86 if (PrintStubCode || _print_code) { 86 if (PrintStubCode || _print_code) {
87 CodeBuffer* cbuf = _masm->code(); 87 CodeBuffer* cbuf = _masm->code();
88 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start()); 88 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start());
89 if (blob != NULL) { 89 if (blob != NULL) {
90 blob->set_comments(cbuf->comments()); 90 blob->set_strings(cbuf->strings());
91 } 91 }
92 bool saw_first = false; 92 bool saw_first = false;
93 StubCodeDesc* toprint[1000]; 93 StubCodeDesc* toprint[1000];
94 int toprint_len = 0; 94 int toprint_len = 0;
95 for (StubCodeDesc* cdesc = _last_stub; cdesc != NULL; cdesc = cdesc->_next) { 95 for (StubCodeDesc* cdesc = _last_stub; cdesc != NULL; cdesc = cdesc->_next) {