equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, 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. |
189 return _end_of_last_safepoint; |
189 return _end_of_last_safepoint; |
190 } |
190 } |
191 static bool is_cleanup_needed(); |
191 static bool is_cleanup_needed(); |
192 static void do_cleanup_tasks(); |
192 static void do_cleanup_tasks(); |
193 |
193 |
194 // Debugging |
|
195 static void print_state() PRODUCT_RETURN; |
|
196 static void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(1, 2) PRODUCT_RETURN; |
|
197 |
|
198 static void deferred_initialize_stat(); |
194 static void deferred_initialize_stat(); |
199 static void print_stat_on_exit(); |
195 static void print_stat_on_exit(); |
200 inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; } |
196 inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; } |
201 |
197 |
202 static void set_is_at_safepoint() { _state = _synchronized; } |
198 static void set_is_at_safepoint() { _state = _synchronized; } |
256 void print() const { print_on(tty); } |
252 void print() const { print_on(tty); } |
257 |
253 |
258 // Initialize |
254 // Initialize |
259 static void create(JavaThread *thread); |
255 static void create(JavaThread *thread); |
260 static void destroy(JavaThread *thread); |
256 static void destroy(JavaThread *thread); |
261 |
|
262 void safepoint_msg(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) { |
|
263 if (ShowSafepointMsgs) { |
|
264 va_list ap; |
|
265 va_start(ap, format); |
|
266 tty->vprint_cr(format, ap); |
|
267 va_end(ap); |
|
268 } |
|
269 } |
|
270 }; |
257 }; |
271 |
258 |
272 |
259 |
273 |
260 |
274 #endif // SHARE_VM_RUNTIME_SAFEPOINT_HPP |
261 #endif // SHARE_VM_RUNTIME_SAFEPOINT_HPP |