mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6820167: GCALotAtAllSafepoints + FullGCALot(ScavengeALot) options crash JVM
Short-circuit gc-a-lot attempts by non-JavaThreads; SkipGCALot c'tor to elide re-entrant gc-a-lot attempts. Reviewed-by: apetrusenko, jcoomes, jmasa, kamg
This commit is contained in:
parent
46dcdf10e6
commit
9d9317de4c
5 changed files with 39 additions and 2 deletions
|
@ -191,6 +191,9 @@ class Thread: public ThreadShadow {
|
|||
NOT_PRODUCT(int _allow_safepoint_count;) // If 0, thread allow a safepoint to happen
|
||||
debug_only (int _allow_allocation_count;) // If 0, the thread is allowed to allocate oops.
|
||||
|
||||
// Used by SkipGCALot class.
|
||||
NOT_PRODUCT(bool _skip_gcalot;) // Should we elide gc-a-lot?
|
||||
|
||||
// Record when GC is locked out via the GC_locker mechanism
|
||||
CHECK_UNHANDLED_OOPS_ONLY(int _gc_locked_out_count;)
|
||||
|
||||
|
@ -308,6 +311,11 @@ class Thread: public ThreadShadow {
|
|||
bool is_gc_locked_out() { return _gc_locked_out_count > 0; }
|
||||
#endif // CHECK_UNHANDLED_OOPS
|
||||
|
||||
#ifndef PRODUCT
|
||||
bool skip_gcalot() { return _skip_gcalot; }
|
||||
void set_skip_gcalot(bool v) { _skip_gcalot = v; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
// Installs a pending exception to be inserted later
|
||||
static void send_async_exception(oop thread_oop, oop java_throwable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue