Skip to content

Commit

Permalink
8289575: G1: Remove unnecessary is-marking-active check in G1BarrierS…
Browse files Browse the repository at this point in the history
…etRuntime::write_ref_field_pre_entry

Reviewed-by: tschatzl, iwalulya
  • Loading branch information
albertnetymk committed Jul 4, 2022
1 parent 8e7a3cb commit e31003a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1BarrierSetRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ JRT_LEAF(void, G1BarrierSetRuntime::write_ref_field_pre_entry(oopDesc* orig, Jav
assert(oopDesc::is_oop(orig, true /* ignore mark word */), "Error");
// store the original value that was in the field reference
SATBMarkQueue& queue = G1ThreadLocalData::satb_mark_queue(thread);
G1BarrierSet::satb_mark_queue_set().enqueue(queue, orig);
G1BarrierSet::satb_mark_queue_set().enqueue_known_active(queue, orig);
JRT_END

// G1 post write barrier slowpath
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/shared/satbMarkQueue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ class SATBMarkQueueSet: public PtrQueueSet {

void flush_queue(SATBMarkQueue& queue);

// When active, add obj to queue by calling enqueue_known_active.
void enqueue(SATBMarkQueue& queue, oop obj) {
if (queue.is_active()) enqueue_known_active(queue, obj);
}
// Add obj to queue. This qset and the queue must be active.
void enqueue_known_active(SATBMarkQueue& queue, oop obj);
virtual void filter(SATBMarkQueue& queue) = 0;
Expand Down

1 comment on commit e31003a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.