8213229: Investigate treating StringTable as weak in young collections

Reviewed-by: zgu, kbarrett
This commit is contained in:
Thomas Schatzl 2019-01-29 11:30:17 +01:00
parent 51e2252a73
commit d800361151
42 changed files with 319 additions and 555 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,10 @@
template<typename T> class WorkerDataArray;
class WeakProcessorPhaseTimes : public CHeapObj<mtGC> {
enum {
DeadItems,
TotalItems
};
uint _max_threads;
uint _active_workers;
@ -43,15 +47,20 @@ class WeakProcessorPhaseTimes : public CHeapObj<mtGC> {
// processed by multiple threads are unused, as are entries for
// unexecuted phases.
double _phase_times_sec[WeakProcessorPhases::phase_count];
size_t _phase_dead_items[WeakProcessorPhases::phase_count];
size_t _phase_total_items[WeakProcessorPhases::phase_count];
// Per-worker times, if multiple threads used and the phase was executed.
WorkerDataArray<double>* _worker_phase_times_sec[WeakProcessorPhases::oop_storage_phase_count];
// Per-worker times and linked items, if multiple threads used and the phase was executed.
WorkerDataArray<double>* _worker_data[WeakProcessorPhases::oop_storage_phase_count];
WorkerDataArray<size_t>* _worker_dead_items[WeakProcessorPhases::oop_storage_phase_count];
WorkerDataArray<size_t>* _worker_total_items[WeakProcessorPhases::oop_storage_phase_count];
WorkerDataArray<double>* worker_data(WeakProcessorPhase phase) const;
void log_st_phase(WeakProcessorPhase phase, uint indent) const;
void log_mt_phase_summary(WeakProcessorPhase phase, uint indent) const;
void log_mt_phase_details(WeakProcessorPhase phase, uint indent) const;
template <typename T>
void log_mt_phase_details(WorkerDataArray<T>* data, uint indent) const;
public:
WeakProcessorPhaseTimes(uint max_threads);
@ -67,7 +76,9 @@ public:
void record_total_time_sec(double time_sec);
void record_phase_time_sec(WeakProcessorPhase phase, double time_sec);
void record_phase_items(WeakProcessorPhase phase, size_t num_dead, size_t num_total);
void record_worker_time_sec(uint worker_id, WeakProcessorPhase phase, double time_sec);
void record_worker_items(uint worker_id, WeakProcessorPhase phase, size_t num_dead, size_t num_total);
void reset();