mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8200106: Move NoSafepointVerifier out from gcLocker.hpp
Reviewed-by: coleenp
This commit is contained in:
parent
7595845e9a
commit
1a1aecd166
69 changed files with 412 additions and 332 deletions
|
@ -576,6 +576,31 @@ void VMThread::loop() {
|
|||
}
|
||||
}
|
||||
|
||||
// A SkipGCALot object is used to elide the usual effect of gc-a-lot
|
||||
// over a section of execution by a thread. Currently, it's used only to
|
||||
// prevent re-entrant calls to GC.
|
||||
class SkipGCALot : public StackObj {
|
||||
private:
|
||||
bool _saved;
|
||||
Thread* _t;
|
||||
|
||||
public:
|
||||
#ifdef ASSERT
|
||||
SkipGCALot(Thread* t) : _t(t) {
|
||||
_saved = _t->skip_gcalot();
|
||||
_t->set_skip_gcalot(true);
|
||||
}
|
||||
|
||||
~SkipGCALot() {
|
||||
assert(_t->skip_gcalot(), "Save-restore protocol invariant");
|
||||
_t->set_skip_gcalot(_saved);
|
||||
}
|
||||
#else
|
||||
SkipGCALot(Thread* t) { }
|
||||
~SkipGCALot() { }
|
||||
#endif
|
||||
};
|
||||
|
||||
void VMThread::execute(VM_Operation* op) {
|
||||
Thread* t = Thread::current();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue