mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-20 02:17:53 +00:00
8150367: Add back information about the number of GC workers
Reviewed-by: sjohanss, tschatzl
This commit is contained in:
parent
8c7980f33a
commit
e020d2f477
@ -3235,10 +3235,6 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
|
||||
GCTraceCPUTime tcpu;
|
||||
|
||||
uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
|
||||
workers()->active_workers(),
|
||||
Threads::number_of_non_daemon_threads());
|
||||
workers()->set_active_workers(active_workers);
|
||||
FormatBuffer<> gc_string("Pause ");
|
||||
if (collector_state()->during_initial_mark_pause()) {
|
||||
gc_string.append("Initial Mark");
|
||||
@ -3249,6 +3245,11 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
}
|
||||
GCTraceTime(Info, gc) tm(gc_string, NULL, gc_cause(), true);
|
||||
|
||||
uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
|
||||
workers()->active_workers(),
|
||||
Threads::number_of_non_daemon_threads());
|
||||
workers()->set_active_workers(active_workers);
|
||||
|
||||
g1_policy()->note_gc_start(active_workers);
|
||||
|
||||
TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "gc/shared/gcId.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
@ -151,6 +152,7 @@ class AbstractWorkGang : public CHeapObj<mtInternal> {
|
||||
_active_workers = MAX2(1U, _active_workers);
|
||||
assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
|
||||
"Unless dynamic should use total workers");
|
||||
log_info(gc, task)("GC Workers: %d", _active_workers);
|
||||
}
|
||||
|
||||
// Return the Ith worker.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user