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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/javaClasses.hpp"
27 #include "classfile/stringTable.hpp"
28 #include "classfile/systemDictionary.hpp"
29 #include "classfile/vmSymbols.hpp"
30 #include "code/codeCache.hpp"
31 #include "code/icBuffer.hpp"
32 #include "gc_implementation/shared/gcHeapSummary.hpp"
33 #include "gc_implementation/shared/gcTimer.hpp"
34 #include "gc_implementation/shared/gcTrace.hpp"
35 #include "gc_implementation/shared/gcTraceTime.hpp"
36 #include "gc_interface/collectedHeap.inline.hpp"
37 #include "memory/genCollectedHeap.hpp"
38 #include "memory/genMarkSweep.hpp"
39 #include "memory/genOopClosures.inline.hpp"
40 #include "memory/modRefBarrierSet.hpp"
41 #include "memory/referencePolicy.hpp"
42 #include "memory/space.hpp"
43 #include "oops/instanceRefKlass.hpp"
44 #include "oops/oop.inline.hpp"
45 #include "prims/jvmtiExport.hpp"
46 #include "runtime/fprofiler.hpp"
47 #include "runtime/handles.inline.hpp"
48 #include "runtime/synchronizer.hpp"
49 #include "runtime/thread.inline.hpp"
50 #include "runtime/vmThread.hpp"
51 #include "utilities/copy.hpp"
52 #include "utilities/events.hpp"
53 #include "utilities/stack.inline.hpp"
54
55 void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp, bool clear_all_softrefs) {
56 guarantee(level == 1, "We always collect both old and young.");
57 assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
58
59 GenCollectedHeap* gch = GenCollectedHeap::heap();
60 #ifdef ASSERT
61 if (gch->collector_policy()->should_clear_all_soft_refs()) {
62 assert(clear_all_softrefs, "Policy should have been checked earlier");
|
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 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/javaClasses.hpp"
27 #include "classfile/stringTable.hpp"
28 #include "classfile/systemDictionary.hpp"
29 #include "classfile/vmSymbols.hpp"
30 #include "code/codeCache.hpp"
31 #include "code/icBuffer.hpp"
32 #include "gc/serial/genMarkSweep.hpp"
33 #include "gc/shared/collectedHeap.inline.hpp"
34 #include "gc/shared/gcHeapSummary.hpp"
35 #include "gc/shared/gcTimer.hpp"
36 #include "gc/shared/gcTrace.hpp"
37 #include "gc/shared/gcTraceTime.hpp"
38 #include "gc/shared/genCollectedHeap.hpp"
39 #include "gc/shared/genOopClosures.inline.hpp"
40 #include "gc/shared/modRefBarrierSet.hpp"
41 #include "gc/shared/referencePolicy.hpp"
42 #include "gc/shared/space.hpp"
43 #include "oops/instanceRefKlass.hpp"
44 #include "oops/oop.inline.hpp"
45 #include "prims/jvmtiExport.hpp"
46 #include "runtime/fprofiler.hpp"
47 #include "runtime/handles.inline.hpp"
48 #include "runtime/synchronizer.hpp"
49 #include "runtime/thread.inline.hpp"
50 #include "runtime/vmThread.hpp"
51 #include "utilities/copy.hpp"
52 #include "utilities/events.hpp"
53 #include "utilities/stack.inline.hpp"
54
55 void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp, bool clear_all_softrefs) {
56 guarantee(level == 1, "We always collect both old and young.");
57 assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
58
59 GenCollectedHeap* gch = GenCollectedHeap::heap();
60 #ifdef ASSERT
61 if (gch->collector_policy()->should_clear_all_soft_refs()) {
62 assert(clear_all_softrefs, "Policy should have been checked earlier");
|