equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
36 class OopClosure; |
36 class OopClosure; |
37 class OopsInGenClosure; |
37 class OopsInGenClosure; |
38 class ObjectClosure; |
38 class ObjectClosure; |
39 class SubTasksDone; |
39 class SubTasksDone; |
40 class WorkGang; |
40 class WorkGang; |
|
41 class FlexibleWorkGang; |
41 class CollectorPolicy; |
42 class CollectorPolicy; |
42 class KlassHandle; |
43 class KlassHandle; |
43 |
44 |
44 class SharedHeap : public CollectedHeap { |
45 class SharedHeap : public CollectedHeap { |
45 friend class VMStructs; |
46 friend class VMStructs; |
72 // See the discussion below, in the specification of the reader function |
73 // See the discussion below, in the specification of the reader function |
73 // for this variable. |
74 // for this variable. |
74 int _strong_roots_parity; |
75 int _strong_roots_parity; |
75 |
76 |
76 // If we're doing parallel GC, use this gang of threads. |
77 // If we're doing parallel GC, use this gang of threads. |
77 WorkGang* _workers; |
78 FlexibleWorkGang* _workers; |
78 |
79 |
79 // Number of parallel threads currently working on GC tasks. |
80 // Number of parallel threads currently working on GC tasks. |
80 // O indicates use sequential code; 1 means use parallel code even with |
81 // O indicates use sequential code; 1 means use parallel code even with |
81 // only one thread, for performance testing purposes. |
82 // only one thread, for performance testing purposes. |
82 int _n_par_threads; |
83 int _n_par_threads; |
187 SO_Symbols = 0x4, |
188 SO_Symbols = 0x4, |
188 SO_Strings = 0x8, |
189 SO_Strings = 0x8, |
189 SO_CodeCache = 0x10 |
190 SO_CodeCache = 0x10 |
190 }; |
191 }; |
191 |
192 |
192 WorkGang* workers() const { return _workers; } |
193 FlexibleWorkGang* workers() const { return _workers; } |
193 |
194 |
194 // Sets the number of parallel threads that will be doing tasks |
195 // Sets the number of parallel threads that will be doing tasks |
195 // (such as process strong roots) subsequently. |
196 // (such as process strong roots) subsequently. |
196 virtual void set_par_threads(int t); |
197 virtual void set_par_threads(int t); |
197 |
198 |