1.1 --- a/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Fri Mar 16 16:14:04 2012 +0100 1.2 +++ b/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp Mon Mar 12 14:59:00 2012 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -43,8 +43,9 @@ 1.11 1.12 public: 1.13 VM_G1OperationWithAllocRequest(unsigned int gc_count_before, 1.14 - size_t word_size) 1.15 - : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure), 1.16 + size_t word_size, 1.17 + GCCause::Cause gc_cause) 1.18 + : VM_GC_Operation(gc_count_before, gc_cause), 1.19 _word_size(word_size), _result(NULL), _pause_succeeded(false) { } 1.20 HeapWord* result() { return _result; } 1.21 bool pause_succeeded() { return _pause_succeeded; } 1.22 @@ -77,6 +78,7 @@ 1.23 class VM_G1IncCollectionPause: public VM_G1OperationWithAllocRequest { 1.24 private: 1.25 bool _should_initiate_conc_mark; 1.26 + bool _should_retry_gc; 1.27 double _target_pause_time_ms; 1.28 unsigned int _full_collections_completed_before; 1.29 public: 1.30 @@ -86,11 +88,13 @@ 1.31 double target_pause_time_ms, 1.32 GCCause::Cause gc_cause); 1.33 virtual VMOp_Type type() const { return VMOp_G1IncCollectionPause; } 1.34 + virtual bool doit_prologue(); 1.35 virtual void doit(); 1.36 virtual void doit_epilogue(); 1.37 virtual const char* name() const { 1.38 return "garbage-first incremental collection pause"; 1.39 } 1.40 + bool should_retry_gc() const { return _should_retry_gc; } 1.41 }; 1.42 1.43 // Concurrent GC stop-the-world operations such as remark and cleanup; 1.44 @@ -98,6 +102,7 @@ 1.45 class VM_CGC_Operation: public VM_Operation { 1.46 VoidClosure* _cl; 1.47 const char* _printGCMessage; 1.48 + bool _needs_pll; 1.49 1.50 protected: 1.51 // java.lang.ref.Reference support 1.52 @@ -105,8 +110,8 @@ 1.53 void release_and_notify_pending_list_lock(); 1.54 1.55 public: 1.56 - VM_CGC_Operation(VoidClosure* cl, const char *printGCMsg) 1.57 - : _cl(cl), _printGCMessage(printGCMsg) { } 1.58 + VM_CGC_Operation(VoidClosure* cl, const char *printGCMsg, bool needs_pll) 1.59 + : _cl(cl), _printGCMessage(printGCMsg), _needs_pll(needs_pll) { } 1.60 virtual VMOp_Type type() const { return VMOp_CGC_Operation; } 1.61 virtual void doit(); 1.62 virtual bool doit_prologue();