8201318: Introduce GCThreadLocalData to abstract GC-specific data belonging to a thread

Reviewed-by: shade, rehn
This commit is contained in:
Per Lidén 2018-04-12 08:25:56 +02:00
parent 4c60e69b97
commit 6825739d3f
38 changed files with 372 additions and 299 deletions

View file

@ -47,6 +47,9 @@
#include "opto/subnode.hpp"
#include "opto/type.hpp"
#include "runtime/sharedRuntime.hpp"
#if INCLUDE_ALL_GCS
#include "gc/g1/g1ThreadLocalData.hpp"
#endif // INCLUDE_ALL_GCS
//
@ -292,8 +295,7 @@ void PhaseMacroExpand::eliminate_card_mark(Node* p2x) {
cmpx->is_Cmp() && cmpx->in(2) == intcon(0) &&
cmpx->in(1)->is_Load()) {
Node* adr = cmpx->in(1)->as_Load()->in(MemNode::Address);
const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() +
SATBMarkQueue::byte_offset_of_active());
const int marking_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
if (adr->is_AddP() && adr->in(AddPNode::Base) == top() &&
adr->in(AddPNode::Address)->Opcode() == Op_ThreadLocal &&
adr->in(AddPNode::Offset) == MakeConX(marking_offset)) {