Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/shared/vmGCOperations.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | e6195383bcaf |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
39 #include "utilities/macros.hpp" | 39 #include "utilities/macros.hpp" |
40 #if INCLUDE_ALL_GCS | 40 #if INCLUDE_ALL_GCS |
41 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" | 41 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" |
42 #endif // INCLUDE_ALL_GCS | 42 #endif // INCLUDE_ALL_GCS |
43 | 43 |
44 #ifndef USDT2 | |
45 HS_DTRACE_PROBE_DECL1(hotspot, gc__begin, bool); | |
46 HS_DTRACE_PROBE_DECL(hotspot, gc__end); | |
47 #endif /* !USDT2 */ | |
48 | |
44 // The same dtrace probe can't be inserted in two different files, so we | 49 // The same dtrace probe can't be inserted in two different files, so we |
45 // have to call it here, so it's only in one file. Can't create new probes | 50 // have to call it here, so it's only in one file. Can't create new probes |
46 // for the other file anymore. The dtrace probes have to remain stable. | 51 // for the other file anymore. The dtrace probes have to remain stable. |
47 void VM_GC_Operation::notify_gc_begin(bool full) { | 52 void VM_GC_Operation::notify_gc_begin(bool full) { |
53 #ifndef USDT2 | |
54 HS_DTRACE_PROBE1(hotspot, gc__begin, full); | |
55 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); | |
56 #else /* USDT2 */ | |
48 HOTSPOT_GC_BEGIN( | 57 HOTSPOT_GC_BEGIN( |
49 full); | 58 full); |
59 #endif /* USDT2 */ | |
60 } | |
61 | |
62 void VM_GC_Operation::notify_gc_end() { | |
63 #ifndef USDT2 | |
64 HS_DTRACE_PROBE(hotspot, gc__end); | |
50 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); | 65 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); |
51 } | 66 #else /* USDT2 */ |
52 | 67 HOTSPOT_GC_END( |
53 void VM_GC_Operation::notify_gc_end() { | 68 ); |
54 HOTSPOT_GC_END(); | 69 #endif /* USDT2 */ |
55 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG(); | |
56 } | 70 } |
57 | 71 |
58 void VM_GC_Operation::acquire_pending_list_lock() { | 72 void VM_GC_Operation::acquire_pending_list_lock() { |
59 // we may enter this with pending exception set | 73 // we may enter this with pending exception set |
60 InstanceRefKlass::acquire_pending_list_lock(&_pending_list_basic_lock); | 74 InstanceRefKlass::acquire_pending_list_lock(&_pending_list_basic_lock); |
66 InstanceRefKlass::release_and_notify_pending_list_lock(&_pending_list_basic_lock); | 80 InstanceRefKlass::release_and_notify_pending_list_lock(&_pending_list_basic_lock); |
67 } | 81 } |
68 | 82 |
69 // Allocations may fail in several threads at about the same time, | 83 // Allocations may fail in several threads at about the same time, |
70 // resulting in multiple gc requests. We only want to do one of them. | 84 // resulting in multiple gc requests. We only want to do one of them. |
71 // In case a GC locker is active and the need for a GC is already signaled, | 85 // In case a GC locker is active and the need for a GC is already signalled, |
72 // we want to skip this GC attempt altogether, without doing a futile | 86 // we want to skip this GC attempt altogether, without doing a futile |
73 // safepoint operation. | 87 // safepoint operation. |
74 bool VM_GC_Operation::skip_operation() const { | 88 bool VM_GC_Operation::skip_operation() const { |
75 bool skip = (_gc_count_before != Universe::heap()->total_collections()); | 89 bool skip = (_gc_count_before != Universe::heap()->total_collections()); |
76 if (_full && skip) { | 90 if (_full && skip) { |