94 // _dependency_context_addr if it relocates the holder
95 // (e.g. CallSiteContext Java object).
96 SafepointStateTracker _safepoint_tracker;
97
98 DependencyContext(nmethodBucket* volatile* bucket_addr, volatile uint64_t* last_cleanup_addr)
99 : _dependency_context_addr(bucket_addr),
100 _last_cleanup_addr(last_cleanup_addr),
101 _safepoint_tracker(SafepointSynchronize::safepoint_state_tracker()) {}
102
103 ~DependencyContext() {
104 assert(!_safepoint_tracker.safepoint_state_changed(), "must be the same safepoint");
105 }
106 #else
107 DependencyContext(nmethodBucket* volatile* bucket_addr, volatile uint64_t* last_cleanup_addr)
108 : _dependency_context_addr(bucket_addr),
109 _last_cleanup_addr(last_cleanup_addr) {}
110 #endif // ASSERT
111
112 static void init();
113
114 void mark_dependent_nmethods(DeoptimizationScope* deopt_scope, DepChange& changes);
115 void add_dependent_nmethod(nmethod* nm);
116 void remove_all_dependents();
117 void remove_and_mark_for_deoptimization_all_dependents(DeoptimizationScope* deopt_scope);
118 void clean_unloading_dependents();
119 static nmethodBucket* release_and_get_next_not_unloading(nmethodBucket* b);
120 static void purge_dependency_contexts();
121 static void release(nmethodBucket* b);
122 static void cleaning_start();
123 static void cleaning_end();
124
125 #ifndef PRODUCT
126 void print_dependent_nmethods(bool verbose);
127 bool is_empty();
128 #endif //PRODUCT
129 bool is_dependent_nmethod(nmethod* nm);
130 };
131 #endif // SHARE_CODE_DEPENDENCYCONTEXT_HPP
|
94 // _dependency_context_addr if it relocates the holder
95 // (e.g. CallSiteContext Java object).
96 SafepointStateTracker _safepoint_tracker;
97
98 DependencyContext(nmethodBucket* volatile* bucket_addr, volatile uint64_t* last_cleanup_addr)
99 : _dependency_context_addr(bucket_addr),
100 _last_cleanup_addr(last_cleanup_addr),
101 _safepoint_tracker(SafepointSynchronize::safepoint_state_tracker()) {}
102
103 ~DependencyContext() {
104 assert(!_safepoint_tracker.safepoint_state_changed(), "must be the same safepoint");
105 }
106 #else
107 DependencyContext(nmethodBucket* volatile* bucket_addr, volatile uint64_t* last_cleanup_addr)
108 : _dependency_context_addr(bucket_addr),
109 _last_cleanup_addr(last_cleanup_addr) {}
110 #endif // ASSERT
111
112 static void init();
113
114 void mark_dependent_nmethods(DeoptimizationScope* deopt_scope, DepChange& changes, InstanceKlass* context = nullptr);
115 void add_dependent_nmethod(nmethod* nm);
116 void remove_all_dependents();
117 void remove_and_mark_for_deoptimization_all_dependents(DeoptimizationScope* deopt_scope);
118 void clean_unloading_dependents();
119 static nmethodBucket* release_and_get_next_not_unloading(nmethodBucket* b);
120 static void purge_dependency_contexts();
121 static void release(nmethodBucket* b);
122 static void cleaning_start();
123 static void cleaning_end();
124
125 #ifndef PRODUCT
126 void print_dependent_nmethods(bool verbose);
127 bool is_empty();
128 #endif //PRODUCT
129 bool is_dependent_nmethod(nmethod* nm);
130 };
131 #endif // SHARE_CODE_DEPENDENCYCONTEXT_HPP
|