comparison src/share/vm/runtime/thread.hpp @ 806:821269eca479

6820167: GCALotAtAllSafepoints + FullGCALot(ScavengeALot) options crash JVM Summary: 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
author ysr
date Thu, 11 Jun 2009 12:40:00 -0700
parents b9fba36710f2
children bd02caa94611
comparison
equal deleted inserted replaced
800:7295839252de 806:821269eca479
189 // The two classes No_Safepoint_Verifier and No_Allocation_Verifier are used to set these counters. 189 // The two classes No_Safepoint_Verifier and No_Allocation_Verifier are used to set these counters.
190 // 190 //
191 NOT_PRODUCT(int _allow_safepoint_count;) // If 0, thread allow a safepoint to happen 191 NOT_PRODUCT(int _allow_safepoint_count;) // If 0, thread allow a safepoint to happen
192 debug_only (int _allow_allocation_count;) // If 0, the thread is allowed to allocate oops. 192 debug_only (int _allow_allocation_count;) // If 0, the thread is allowed to allocate oops.
193 193
194 // Used by SkipGCALot class.
195 NOT_PRODUCT(bool _skip_gcalot;) // Should we elide gc-a-lot?
196
194 // Record when GC is locked out via the GC_locker mechanism 197 // Record when GC is locked out via the GC_locker mechanism
195 CHECK_UNHANDLED_OOPS_ONLY(int _gc_locked_out_count;) 198 CHECK_UNHANDLED_OOPS_ONLY(int _gc_locked_out_count;)
196 199
197 friend class No_Alloc_Verifier; 200 friend class No_Alloc_Verifier;
198 friend class No_Safepoint_Verifier; 201 friend class No_Safepoint_Verifier;
305 void clear_unhandled_oops() { 308 void clear_unhandled_oops() {
306 if (CheckUnhandledOops) unhandled_oops()->clear_unhandled_oops(); 309 if (CheckUnhandledOops) unhandled_oops()->clear_unhandled_oops();
307 } 310 }
308 bool is_gc_locked_out() { return _gc_locked_out_count > 0; } 311 bool is_gc_locked_out() { return _gc_locked_out_count > 0; }
309 #endif // CHECK_UNHANDLED_OOPS 312 #endif // CHECK_UNHANDLED_OOPS
313
314 #ifndef PRODUCT
315 bool skip_gcalot() { return _skip_gcalot; }
316 void set_skip_gcalot(bool v) { _skip_gcalot = v; }
317 #endif
310 318
311 public: 319 public:
312 // Installs a pending exception to be inserted later 320 // Installs a pending exception to be inserted later
313 static void send_async_exception(oop thread_oop, oop java_throwable); 321 static void send_async_exception(oop thread_oop, oop java_throwable);
314 322