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.inline.hpp"
27 #include "classfile/systemDictionary.hpp"
28 #include "gc/shared/collectedHeap.hpp"
29 #include "gc/shared/collectedHeap.inline.hpp"
30 #include "gc/shared/gcTimer.hpp"
31 #include "gc/shared/gcTraceTime.inline.hpp"
32 #include "gc/shared/referencePolicy.hpp"
33 #include "gc/shared/referenceProcessor.inline.hpp"
34 #include "logging/log.hpp"
35 #include "memory/allocation.hpp"
36 #include "memory/resourceArea.hpp"
37 #include "oops/access.inline.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/java.hpp"
40
41 ReferencePolicy* ReferenceProcessor::_always_clear_soft_ref_policy = NULL;
42 ReferencePolicy* ReferenceProcessor::_default_soft_ref_policy = NULL;
43 jlong ReferenceProcessor::_soft_ref_timestamp_clock = 0;
44
45 void referenceProcessor_init() {
46 ReferenceProcessor::init_statics();
47 }
48
49 void ReferenceProcessor::init_statics() {
50 // We need a monotonically non-decreasing time in ms but
51 // os::javaTimeMillis() does not guarantee monotonicity.
52 jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
53
54 // Initialize the soft ref timestamp clock.
55 _soft_ref_timestamp_clock = now;
|
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.inline.hpp"
27 #include "classfile/systemDictionary.hpp"
28 #include "gc/shared/collectedHeap.hpp"
29 #include "gc/shared/collectedHeap.inline.hpp"
30 #include "gc/shared/gcTimer.hpp"
31 #include "gc/shared/gcTraceTime.inline.hpp"
32 #include "gc/shared/referencePolicy.hpp"
33 #include "gc/shared/referenceProcessor.inline.hpp"
34 #include "logging/log.hpp"
35 #include "memory/allocation.inline.hpp"
36 #include "memory/resourceArea.hpp"
37 #include "oops/access.inline.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/java.hpp"
40
41 ReferencePolicy* ReferenceProcessor::_always_clear_soft_ref_policy = NULL;
42 ReferencePolicy* ReferenceProcessor::_default_soft_ref_policy = NULL;
43 jlong ReferenceProcessor::_soft_ref_timestamp_clock = 0;
44
45 void referenceProcessor_init() {
46 ReferenceProcessor::init_statics();
47 }
48
49 void ReferenceProcessor::init_statics() {
50 // We need a monotonically non-decreasing time in ms but
51 // os::javaTimeMillis() does not guarantee monotonicity.
52 jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
53
54 // Initialize the soft ref timestamp clock.
55 _soft_ref_timestamp_clock = now;
|