mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8355635: Do not collect C strings in C2 scratch buffer
Reviewed-by: jrose, thartmann, shade
This commit is contained in:
parent
a7359a5091
commit
3eaec040b4
@ -1042,6 +1042,9 @@ void CodeBuffer::shared_stub_to_interp_for(ciMethod* callee, csize_t call_offset
|
||||
|
||||
#ifndef PRODUCT
|
||||
void CodeBuffer::block_comment(ptrdiff_t offset, const char* comment) {
|
||||
if (insts()->scratch_emit()) {
|
||||
return;
|
||||
}
|
||||
if (_collect_comments) {
|
||||
const char* str = _asm_remarks.insert(offset, comment);
|
||||
postcond(str != comment);
|
||||
@ -1049,6 +1052,9 @@ void CodeBuffer::block_comment(ptrdiff_t offset, const char* comment) {
|
||||
}
|
||||
|
||||
const char* CodeBuffer::code_string(const char* str) {
|
||||
if (insts()->scratch_emit()) {
|
||||
return str;
|
||||
}
|
||||
const char* tmp = _dbg_strings.insert(str);
|
||||
postcond(tmp != str);
|
||||
return tmp;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user