28 #include "gc/shared/allocTracer.hpp"
29 #include "gc/shared/gcId.hpp"
30 #include "gc/shared/gcLocker.inline.hpp"
31 #include "gc/shared/genCollectedHeap.hpp"
32 #include "gc/shared/vmGCOperations.hpp"
33 #include "logging/log.hpp"
34 #include "memory/oopFactory.hpp"
35 #include "runtime/handles.inline.hpp"
36 #include "runtime/init.hpp"
37 #include "runtime/interfaceSupport.hpp"
38 #include "utilities/dtrace.hpp"
39 #include "utilities/macros.hpp"
40 #include "utilities/preserveException.hpp"
41 #if INCLUDE_ALL_GCS
42 #include "gc/g1/g1CollectedHeap.inline.hpp"
43 #include "gc/g1/g1Policy.hpp"
44 #endif // INCLUDE_ALL_GCS
45
46 VM_GC_Operation::~VM_GC_Operation() {
47 CollectedHeap* ch = Universe::heap();
48 ch->collector_policy()->set_all_soft_refs_clear(false);
49 }
50
51 // The same dtrace probe can't be inserted in two different files, so we
52 // have to call it here, so it's only in one file. Can't create new probes
53 // for the other file anymore. The dtrace probes have to remain stable.
54 void VM_GC_Operation::notify_gc_begin(bool full) {
55 HOTSPOT_GC_BEGIN(
56 full);
57 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
58 }
59
60 void VM_GC_Operation::notify_gc_end() {
61 HOTSPOT_GC_END();
62 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
63 }
64
65 // Allocations may fail in several threads at about the same time,
66 // resulting in multiple gc requests. We only want to do one of them.
67 // In case a GC locker is active and the need for a GC is already signaled,
68 // we want to skip this GC attempt altogether, without doing a futile
|
28 #include "gc/shared/allocTracer.hpp"
29 #include "gc/shared/gcId.hpp"
30 #include "gc/shared/gcLocker.inline.hpp"
31 #include "gc/shared/genCollectedHeap.hpp"
32 #include "gc/shared/vmGCOperations.hpp"
33 #include "logging/log.hpp"
34 #include "memory/oopFactory.hpp"
35 #include "runtime/handles.inline.hpp"
36 #include "runtime/init.hpp"
37 #include "runtime/interfaceSupport.hpp"
38 #include "utilities/dtrace.hpp"
39 #include "utilities/macros.hpp"
40 #include "utilities/preserveException.hpp"
41 #if INCLUDE_ALL_GCS
42 #include "gc/g1/g1CollectedHeap.inline.hpp"
43 #include "gc/g1/g1Policy.hpp"
44 #endif // INCLUDE_ALL_GCS
45
46 VM_GC_Operation::~VM_GC_Operation() {
47 CollectedHeap* ch = Universe::heap();
48 if (ch->collector_policy()->is_generation_policy()) {
49 ch->collector_policy()->as_generation_policy()->set_all_soft_refs_clear(false);
50 }
51 }
52
53 // The same dtrace probe can't be inserted in two different files, so we
54 // have to call it here, so it's only in one file. Can't create new probes
55 // for the other file anymore. The dtrace probes have to remain stable.
56 void VM_GC_Operation::notify_gc_begin(bool full) {
57 HOTSPOT_GC_BEGIN(
58 full);
59 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
60 }
61
62 void VM_GC_Operation::notify_gc_end() {
63 HOTSPOT_GC_END();
64 HS_DTRACE_WORKAROUND_TAIL_CALL_BUG();
65 }
66
67 // Allocations may fail in several threads at about the same time,
68 // resulting in multiple gc requests. We only want to do one of them.
69 // In case a GC locker is active and the need for a GC is already signaled,
70 // we want to skip this GC attempt altogether, without doing a futile
|