Mercurial > hg > truffle
comparison src/share/vm/memory/gcLocker.inline.hpp @ 4949:ad3b47344802
7144318: GCLocker assert failure: assert(_needs_gc || SafepointSynchronize::is_at_safepoint(
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Thu, 16 Feb 2012 11:33:49 -0800 |
parents | 1a2723f7ad8e |
children | 9c3dc501b5eb |
comparison
equal
deleted
inserted
replaced
4948:c7401dcad8bf | 4949:ad3b47344802 |
---|---|
24 | 24 |
25 #ifndef SHARE_VM_MEMORY_GCLOCKER_INLINE_HPP | 25 #ifndef SHARE_VM_MEMORY_GCLOCKER_INLINE_HPP |
26 #define SHARE_VM_MEMORY_GCLOCKER_INLINE_HPP | 26 #define SHARE_VM_MEMORY_GCLOCKER_INLINE_HPP |
27 | 27 |
28 #include "memory/gcLocker.hpp" | 28 #include "memory/gcLocker.hpp" |
29 | |
30 inline bool GC_locker::is_active() { | |
31 assert(_needs_gc || SafepointSynchronize::is_at_safepoint(), "only read at safepoint"); | |
32 verify_critical_count(); | |
33 return _lock_count > 0 || _jni_lock_count > 0; | |
34 } | |
35 | 29 |
36 inline void GC_locker::lock() { | 30 inline void GC_locker::lock() { |
37 // cast away volatile | 31 // cast away volatile |
38 Atomic::inc(&_lock_count); | 32 Atomic::inc(&_lock_count); |
39 CHECK_UNHANDLED_OOPS_ONLY( | 33 CHECK_UNHANDLED_OOPS_ONLY( |