comparison src/share/vm/gc_implementation/shared/markSweep.hpp @ 10405:f2110083203d

8005849: JEP 167: Event-Based JVM Tracing Reviewed-by: acorn, coleenp, sla Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author sla
date Mon, 10 Jun 2013 11:30:51 +0200
parents 001ec9515f84
children 55a0da3d420b
comparison
equal deleted inserted replaced
10404:d0add7016434 10405:f2110083203d
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, 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.
34 #include "utilities/stack.hpp" 34 #include "utilities/stack.hpp"
35 #include "utilities/taskqueue.hpp" 35 #include "utilities/taskqueue.hpp"
36 36
37 class ReferenceProcessor; 37 class ReferenceProcessor;
38 class DataLayout; 38 class DataLayout;
39 class SerialOldTracer;
40 class STWGCTimer;
39 41
40 // MarkSweep takes care of global mark-compact garbage collection for a 42 // MarkSweep takes care of global mark-compact garbage collection for a
41 // GenCollectedHeap using a four-phase pointer forwarding algorithm. All 43 // GenCollectedHeap using a four-phase pointer forwarding algorithm. All
42 // generations are assumed to support marking; those that can also support 44 // generations are assumed to support marking; those that can also support
43 // compaction. 45 // compaction.
125 static size_t _preserved_count_max; 127 static size_t _preserved_count_max;
126 static PreservedMark* _preserved_marks; 128 static PreservedMark* _preserved_marks;
127 129
128 // Reference processing (used in ...follow_contents) 130 // Reference processing (used in ...follow_contents)
129 static ReferenceProcessor* _ref_processor; 131 static ReferenceProcessor* _ref_processor;
132
133 static STWGCTimer* _gc_timer;
134 static SerialOldTracer* _gc_tracer;
130 135
131 // Non public closures 136 // Non public closures
132 static KeepAliveClosure keep_alive; 137 static KeepAliveClosure keep_alive;
133 138
134 // Debugging 139 // Debugging
149 static uint total_invocations() { return _total_invocations; } 154 static uint total_invocations() { return _total_invocations; }
150 155
151 // Reference Processing 156 // Reference Processing
152 static ReferenceProcessor* const ref_processor() { return _ref_processor; } 157 static ReferenceProcessor* const ref_processor() { return _ref_processor; }
153 158
159 static STWGCTimer* gc_timer() { return _gc_timer; }
160 static SerialOldTracer* gc_tracer() { return _gc_tracer; }
161
154 // Call backs for marking 162 // Call backs for marking
155 static void mark_object(oop obj); 163 static void mark_object(oop obj);
156 // Mark pointer and follow contents. Empty marking stack afterwards. 164 // Mark pointer and follow contents. Empty marking stack afterwards.
157 template <class T> static inline void follow_root(T* p); 165 template <class T> static inline void follow_root(T* p);
158 166