Mercurial > hg > graal-jvmci-8
annotate src/share/vm/gc_implementation/g1/concurrentZFThread.hpp @ 1705:2d160770d2e5
6814437: G1: remove the _new_refs array
Summary: The per-worker _new_refs array is used to hold references that point into the collection set. It is populated during RSet updating and subsequently processed. In the event of an evacuation failure it processed again to recreate the RSets of regions in the collection set. Remove the per-worker _new_refs array by processing the references directly. Use a DirtyCardQueue to hold the cards containing the references so that the RSets of regions in the collection set can be recreated when handling an evacuation failure.
Reviewed-by: iveresov, jmasa, tonyp
author | johnc |
---|---|
date | Mon, 02 Aug 2010 12:51:43 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
rev | line source |
---|---|
342 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1019
diff
changeset
|
2 * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved. |
342 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1019
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1019
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1019
diff
changeset
|
21 * questions. |
342 | 22 * |
23 */ | |
24 | |
25 // The Concurrent ZF Thread. Performs concurrent zero-filling. | |
26 | |
27 class ConcurrentZFThread: public ConcurrentGCThread { | |
28 friend class VMStructs; | |
29 friend class ZeroFillRegionClosure; | |
30 | |
31 private: | |
32 | |
33 // Zero fill the heap region. | |
34 void processHeapRegion(HeapRegion* r); | |
35 | |
36 // Stats | |
37 // Allocation (protected by heap lock). | |
38 static int _region_allocs; // Number of regions allocated | |
39 static int _sync_zfs; // Synchronous zero-fills + | |
40 static int _zf_waits; // Wait for conc zero-fill completion. | |
41 | |
42 // Number of regions CFZ thread fills. | |
43 static int _regions_filled; | |
44 | |
45 double _vtime_start; // Initial virtual time. | |
46 | |
47 // These are static because the "print_summary_info" method is, and | |
48 // it currently assumes there is only one ZF thread. We'll change when | |
49 // we need to. | |
50 static double _vtime_accum; // Initial virtual time. | |
51 static double vtime_accum() { return _vtime_accum; } | |
52 | |
53 // Offer yield for GC. Returns true if yield occurred. | |
54 bool offer_yield(); | |
55 | |
56 public: | |
57 // Constructor | |
58 ConcurrentZFThread(); | |
59 | |
60 // Main loop. | |
61 virtual void run(); | |
62 | |
63 // Printing | |
1019 | 64 void print_on(outputStream* st) const; |
65 void print() const; | |
342 | 66 |
67 // Waits until "r" has been zero-filled. Requires caller to hold the | |
68 // ZF_mon. | |
69 static void wait_for_ZF_completed(HeapRegion* r); | |
70 | |
71 // Get or clear the current unclean region. Should be done | |
72 // while holding the ZF_needed_mon lock. | |
73 | |
74 // shutdown | |
794 | 75 void stop(); |
342 | 76 |
77 // Stats | |
78 static void note_region_alloc() {_region_allocs++; } | |
79 static void note_sync_zfs() { _sync_zfs++; } | |
80 static void note_zf_wait() { _zf_waits++; } | |
81 static void note_region_filled() { _regions_filled++; } | |
82 | |
83 static void print_summary_info(); | |
84 }; |