mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-02 20:20:14 +00:00
8279523: Parallel: Remove unnecessary PSScavenge::_to_space_top_before_gc
Reviewed-by: kbarrett, mli
This commit is contained in:
parent
5fa13bb4a3
commit
79b614cc19
@ -70,7 +70,6 @@
|
||||
#include "services/memoryService.hpp"
|
||||
#include "utilities/stack.inline.hpp"
|
||||
|
||||
HeapWord* PSScavenge::_to_space_top_before_gc = NULL;
|
||||
SpanSubjectToDiscoveryClosure PSScavenge::_span_based_discoverer;
|
||||
ReferenceProcessor* PSScavenge::_ref_processor = NULL;
|
||||
PSCardTable* PSScavenge::_card_table = NULL;
|
||||
@ -443,8 +442,6 @@ bool PSScavenge::invoke_no_policy() {
|
||||
"Attempt to scavenge with live objects in to_space");
|
||||
young_gen->to_space()->clear(SpaceDecorator::Mangle);
|
||||
|
||||
save_to_space_top_before_gc();
|
||||
|
||||
#if COMPILER2_OR_JVMCI
|
||||
DerivedPointerTable::clear();
|
||||
#endif
|
||||
|
||||
@ -53,10 +53,6 @@ class PSScavenge: AllStatic {
|
||||
full_follows_scavenge
|
||||
};
|
||||
|
||||
// Saved value of to_space->top(), used to prevent objects in to_space from
|
||||
// being rescanned.
|
||||
static HeapWord* _to_space_top_before_gc;
|
||||
|
||||
protected:
|
||||
// Flags/counters
|
||||
static SpanSubjectToDiscoveryClosure _span_based_discoverer;
|
||||
@ -80,9 +76,6 @@ class PSScavenge: AllStatic {
|
||||
|
||||
static bool should_attempt_scavenge();
|
||||
|
||||
static HeapWord* to_space_top_before_gc() { return _to_space_top_before_gc; }
|
||||
static inline void save_to_space_top_before_gc();
|
||||
|
||||
// Private accessors
|
||||
static PSCardTable* const card_table() { assert(_card_table != NULL, "Sanity"); return _card_table; }
|
||||
static const ParallelScavengeTracer* gc_tracer() { return &_gc_tracer; }
|
||||
|
||||
@ -35,11 +35,6 @@
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
inline void PSScavenge::save_to_space_top_before_gc() {
|
||||
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
||||
_to_space_top_before_gc = heap->young_gen()->to_space()->top();
|
||||
}
|
||||
|
||||
template <class T> inline bool PSScavenge::should_scavenge(T* p) {
|
||||
T heap_oop = RawAccess<>::oop_load(p);
|
||||
return PSScavenge::is_obj_in_young(heap_oop);
|
||||
@ -51,7 +46,7 @@ inline bool PSScavenge::should_scavenge(T* p, MutableSpace* to_space) {
|
||||
oop obj = RawAccess<IS_NOT_NULL>::oop_load(p);
|
||||
// Skip objects copied to to_space since the scavenge started.
|
||||
HeapWord* const addr = cast_from_oop<HeapWord*>(obj);
|
||||
return addr < to_space_top_before_gc() || addr >= to_space->end();
|
||||
return addr < to_space->bottom() || addr >= to_space->end();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user