Mercurial > hg > truffle
diff src/share/vm/code/relocInfo.cpp @ 13512:8085ce95b6f5
reloc info for safepoint polls includes whether the poison page is far or near
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 06 Jan 2014 13:41:59 +0100 |
parents | 7875ea94bea5 |
children | fa5180b3c18e |
line wrap: on
line diff
--- a/src/share/vm/code/relocInfo.cpp Sat Jan 04 02:08:33 2014 +0200 +++ b/src/share/vm/code/relocInfo.cpp Mon Jan 06 13:41:59 2014 +0100 @@ -679,6 +679,16 @@ _target = address_from_scaled_offset(offset, base); } +void poll_Relocation::pack_data_to(CodeSection* dest) { + short* p = (short*) dest->locs_end(); + p = pack_1_int_to(p, _distance); + dest->set_locs_end((relocInfo*) p); +} + +void poll_Relocation::unpack_data() { + _distance = (poll_Relocation::pollingPageDistance) unpack_1_int(); +} + //// miscellaneous methods oop* oop_Relocation::oop_addr() { int n = _oop_index; @@ -975,6 +985,22 @@ tty->print(" | [static_call=" INTPTR_FORMAT "]", r->static_call()); break; } + case relocInfo::poll_type: + case relocInfo::poll_return_type: + { + poll_Relocation* r = (poll_Relocation*) reloc(); + const char *distanceName = "unknown"; + switch (r->distance()) { + case poll_Relocation::near: + distanceName = "near"; + break; + case poll_Relocation::far: + distanceName = "far"; + break; + } + tty->print(" | [distance=%d(%s)]", r->distance(), distanceName); + break; + } } tty->cr(); }