Skip to content

Commit

Permalink
8327477: Parallel: Remove _data_location and _highest_ref in Parallel…
Browse files Browse the repository at this point in the history
…CompactData

Reviewed-by: gli, tschatzl
  • Loading branch information
albertnetymk committed Mar 8, 2024
1 parent bdd1aeb commit f9d479f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
6 changes: 2 additions & 4 deletions src/hotspot/share/gc/parallel/psParallelCompact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ print_generic_summary_region(size_t i, const ParallelCompactData::RegionData* c)
ParallelCompactData& sd = PSParallelCompact::summary_data();
size_t dci = c->destination() ? sd.addr_to_region_idx(c->destination()) : 0;
log_develop_trace(gc, compaction)(
REGION_IDX_FORMAT " " PTR_FORMAT " "
REGION_IDX_FORMAT " "
REGION_IDX_FORMAT " " PTR_FORMAT " "
REGION_DATA_FORMAT " " REGION_DATA_FORMAT " "
REGION_DATA_FORMAT " " REGION_IDX_FORMAT " %d",
i, p2i(c->data_location()), dci, p2i(c->destination()),
i, dci, p2i(c->destination()),
c->partial_obj_size(), c->live_obj_size(),
c->data_size(), c->source_region(), c->destination_count());

Expand Down Expand Up @@ -540,7 +540,6 @@ ParallelCompactData::summarize_dense_prefix(HeapWord* beg, HeapWord* end)
_region_data[cur_region].set_destination(addr);
_region_data[cur_region].set_destination_count(0);
_region_data[cur_region].set_source_region(cur_region);
_region_data[cur_region].set_data_location(addr);

// Update live_obj_size so the region appears completely full.
size_t live_size = RegionSize - _region_data[cur_region].partial_obj_size();
Expand Down Expand Up @@ -734,7 +733,6 @@ bool ParallelCompactData::summarize(SplitInfo& split_info,
}

_region_data[cur_region].set_destination_count(destination_count);
_region_data[cur_region].set_data_location(region_to_addr(cur_region));
dest_addr += words;
}

Expand Down
21 changes: 1 addition & 20 deletions src/hotspot/share/gc/parallel/psParallelCompact.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,6 @@ class ParallelCompactData
// Number of times the block table was filled.
DEBUG_ONLY(inline size_t blocks_filled_count() const;)

// The location of the java heap data that corresponds to this region.
inline HeapWord* data_location() const;

// Whether this region is available to be claimed, has been claimed, or has
// been completed.
//
Expand All @@ -304,7 +301,7 @@ class ParallelCompactData

inline void set_destination_count(uint count);
inline void set_live_obj_size(size_t words);
inline void set_data_location(HeapWord* addr);

inline void set_completed();
inline bool claim_unsafe();

Expand Down Expand Up @@ -363,11 +360,6 @@ class ParallelCompactData

#ifdef ASSERT
size_t _blocks_filled_count; // Number of block table fills.

// These enable optimizations that are only partially implemented. Use
// debug builds to prevent the code fragments from breaking.
HeapWord* _data_location;
HeapWord* _highest_ref;
#endif // #ifdef ASSERT

#ifdef ASSERT
Expand Down Expand Up @@ -538,17 +530,6 @@ inline void ParallelCompactData::RegionData::decrement_destination_count()
Atomic::add(&_dc_and_los, dc_mask);
}

inline HeapWord* ParallelCompactData::RegionData::data_location() const
{
DEBUG_ONLY(return _data_location;)
NOT_DEBUG(return nullptr;)
}

inline void ParallelCompactData::RegionData::set_data_location(HeapWord* addr)
{
DEBUG_ONLY(_data_location = addr;)
}

inline void ParallelCompactData::RegionData::set_completed()
{
assert(claimed(), "must be claimed first");
Expand Down

1 comment on commit f9d479f

@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.