mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8248391: Unify handling of all OopStorage instances in weak root processing
OopStorage instance now owned by subsystems, and generalize dead entry notification Co-authored-by: Erik Osterlund <erik.osterlund@oracle.com> Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com> Reviewed-by: coleenp, tschatzl
This commit is contained in:
parent
55af701cc3
commit
a8d6a05ce8
42 changed files with 822 additions and 574 deletions
|
@ -115,17 +115,12 @@ void WeakProcessor::Task::work(uint worker_id,
|
|||
CountingSkippedIsAliveClosure<IsAlive, KeepAlive> cl(is_alive, keep_alive);
|
||||
WeakProcessorPhaseTimeTracker pt(_phase_times, phase, worker_id);
|
||||
uint oopstorage_index = WeakProcessorPhases::oopstorage_index(phase);
|
||||
StorageState& cur_state = _storage_states[oopstorage_index];
|
||||
cur_state.oops_do(&cl);
|
||||
StorageState* cur_state = _storage_states.par_state(oopstorage_index);
|
||||
cur_state->oops_do(&cl);
|
||||
cur_state->increment_num_dead(cl.num_skipped() + cl.num_dead());
|
||||
if (_phase_times != NULL) {
|
||||
_phase_times->record_worker_items(worker_id, phase, cl.num_dead(), cl.num_total());
|
||||
}
|
||||
const OopStorage* cur_storage = cur_state.storage();
|
||||
if (cur_storage == OopStorageSet::string_table_weak()) {
|
||||
StringTable::inc_dead_counter(cl.num_dead() + cl.num_skipped());
|
||||
} else if (cur_storage == OopStorageSet::resolved_method_table_weak()) {
|
||||
ResolvedMethodTable::inc_dead_counter(cl.num_dead() + cl.num_skipped());
|
||||
}
|
||||
}
|
||||
|
||||
_serial_phases_done.all_tasks_completed(_nworkers);
|
||||
|
@ -159,6 +154,7 @@ public:
|
|||
{}
|
||||
|
||||
virtual void work(uint worker_id);
|
||||
void report_num_dead() { _task.report_num_dead(); }
|
||||
};
|
||||
|
||||
template<typename IsAlive, typename KeepAlive>
|
||||
|
@ -173,6 +169,7 @@ void WeakProcessor::weak_oops_do(WorkGang* workers,
|
|||
|
||||
GangTask task("Weak Processor", is_alive, keep_alive, phase_times, nworkers);
|
||||
workers->run_task(&task, nworkers);
|
||||
task.report_num_dead();
|
||||
}
|
||||
|
||||
template<typename IsAlive, typename KeepAlive>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue