mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
6984287: Regularize how GC parallel workers are specified
Associate number of GC workers with the workgang as opposed to the task. Reviewed-by: johnc, ysr
This commit is contained in:
parent
3af63c10ab
commit
28e56b8970
29 changed files with 504 additions and 216 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2010, 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
|
||||
|
@ -85,8 +85,10 @@ class ReferenceProcessor : public CHeapObj {
|
|||
|
||||
// The discovered ref lists themselves
|
||||
|
||||
// The MT'ness degree of the queues below
|
||||
// The active MT'ness degree of the queues below
|
||||
int _num_q;
|
||||
// The maximum MT'ness degree of the queues below
|
||||
int _max_num_q;
|
||||
// Arrays of lists of oops, one per thread
|
||||
DiscoveredList* _discoveredSoftRefs;
|
||||
DiscoveredList* _discoveredWeakRefs;
|
||||
|
@ -95,6 +97,7 @@ class ReferenceProcessor : public CHeapObj {
|
|||
|
||||
public:
|
||||
int num_q() { return _num_q; }
|
||||
void set_mt_degree(int v) { _num_q = v; }
|
||||
DiscoveredList* discovered_soft_refs() { return _discoveredSoftRefs; }
|
||||
static oop sentinel_ref() { return _sentinelRef; }
|
||||
static oop* adr_sentinel_ref() { return &_sentinelRef; }
|
||||
|
@ -244,6 +247,7 @@ class ReferenceProcessor : public CHeapObj {
|
|||
_bs(NULL),
|
||||
_is_alive_non_header(NULL),
|
||||
_num_q(0),
|
||||
_max_num_q(0),
|
||||
_processing_is_mt(false),
|
||||
_next_id(0)
|
||||
{}
|
||||
|
@ -312,6 +316,9 @@ class ReferenceProcessor : public CHeapObj {
|
|||
void weak_oops_do(OopClosure* f); // weak roots
|
||||
static void oops_do(OopClosure* f); // strong root(s)
|
||||
|
||||
// Balance each of the discovered lists.
|
||||
void balance_all_queues();
|
||||
|
||||
// Discover a Reference object, using appropriate discovery criteria
|
||||
bool discover_reference(oop obj, ReferenceType rt);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue