mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8031389: On x86 C1 emits two relocations for polls
C1 emits two poll_type relocations at safepoint polls because LIR_Assembler::safepoint_poll(..) adds a relocation and calls LIR_Assembler::add_debug_info_for_branch(..) which adds a relocation as well. The implementation of add_debug_info_for_branch(..) is changed to not emit a poll relocation. Reviewed-by: kvn, roland
This commit is contained in:
parent
8bd4b5624c
commit
aeff8925b3
2 changed files with 1 additions and 5 deletions
|
@ -1612,13 +1612,10 @@ int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
|
||||||
__ set((intptr_t)os::get_polling_page(), tmp->as_register());
|
__ set((intptr_t)os::get_polling_page(), tmp->as_register());
|
||||||
if (info != NULL) {
|
if (info != NULL) {
|
||||||
add_debug_info_for_branch(info);
|
add_debug_info_for_branch(info);
|
||||||
} else {
|
|
||||||
__ relocate(relocInfo::poll_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int offset = __ offset();
|
int offset = __ offset();
|
||||||
|
__ relocate(relocInfo::poll_type);
|
||||||
__ ld_ptr(tmp->as_register(), 0, G0);
|
__ ld_ptr(tmp->as_register(), 0, G0);
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,6 @@ void LIR_Assembler::check_no_unbound_labels() {
|
||||||
|
|
||||||
|
|
||||||
void LIR_Assembler::add_debug_info_for_branch(CodeEmitInfo* info) {
|
void LIR_Assembler::add_debug_info_for_branch(CodeEmitInfo* info) {
|
||||||
_masm->code_section()->relocate(pc(), relocInfo::poll_type);
|
|
||||||
int pc_offset = code_offset();
|
int pc_offset = code_offset();
|
||||||
flush_debug_info(pc_offset);
|
flush_debug_info(pc_offset);
|
||||||
info->record_debug_info(compilation()->debug_info_recorder(), pc_offset);
|
info->record_debug_info(compilation()->debug_info_recorder(), pc_offset);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue