Mercurial > hg > graal-compiler
diff src/share/vm/memory/referenceProcessor.hpp @ 1833:8b10f48633dc
6984287: Regularize how GC parallel workers are specified.
Summary: Associate number of GC workers with the workgang as opposed to the task.
Reviewed-by: johnc, ysr
author | jmasa |
---|---|
date | Mon, 20 Sep 2010 14:38:38 -0700 |
parents | c18cbe5936b8 |
children | 0715f0cf171d |
line wrap: on
line diff
--- a/src/share/vm/memory/referenceProcessor.hpp Thu Sep 16 13:45:55 2010 -0700 +++ b/src/share/vm/memory/referenceProcessor.hpp Mon Sep 20 14:38:38 2010 -0700 @@ -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 @@ // 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 @@ 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 @@ _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 @@ 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);