comparison src/share/vm/runtime/safepoint.hpp @ 1783:d5d065957597

6953144: Tiered compilation Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation. Reviewed-by: kvn, never, phh, twisti
author iveresov
date Fri, 03 Sep 2010 17:51:07 -0700
parents da877bdc9000
children f95d63e2154a
comparison
equal deleted inserted replaced
1782:f353275af40e 1783:d5d065957597
1 /* 1 /*
2 * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 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.
145 145
146 // VM Thread interface for determining safepoint rate 146 // VM Thread interface for determining safepoint rate
147 static long last_non_safepoint_interval() { 147 static long last_non_safepoint_interval() {
148 return os::javaTimeMillis() - _end_of_last_safepoint; 148 return os::javaTimeMillis() - _end_of_last_safepoint;
149 } 149 }
150 static long end_of_last_safepoint() {
151 return _end_of_last_safepoint;
152 }
150 static bool is_cleanup_needed(); 153 static bool is_cleanup_needed();
151 static void do_cleanup_tasks(); 154 static void do_cleanup_tasks();
152 155
153 // debugging 156 // debugging
154 static void print_state() PRODUCT_RETURN; 157 static void print_state() PRODUCT_RETURN;
226 va_end(ap); 229 va_end(ap);
227 } 230 }
228 } 231 }
229 }; 232 };
230 233
231 // 234
232 // CounterDecay
233 //
234 // Interates through invocation counters and decrements them. This
235 // is done at each safepoint.
236 //
237 class CounterDecay : public AllStatic {
238 static jlong _last_timestamp;
239 public:
240 static void decay();
241 static bool is_decay_needed() { return (os::javaTimeMillis() - _last_timestamp) > CounterDecayMinIntervalLength; }
242 };