--- old/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp 2011-01-27 10:33:01.781250000 +0100 +++ new/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp 2011-01-27 10:33:01.062500000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,9 @@ VM_G1OperationWithAllocRequest(unsigned int gc_count_before, size_t word_size) : VM_GC_Operation(gc_count_before), - _word_size(word_size), _result(NULL), _pause_succeeded(false) { } + _word_size(word_size), _result(NULL), _pause_succeeded(false) { + _gc_cause = GCCause::_allocation_failure; + } HeapWord* result() { return _result; } bool pause_succeeded() { return _pause_succeeded; } }; --- old/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp 2011-01-27 10:33:16.781250000 +0100 +++ new/src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp 2011-01-27 10:33:16.078125000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,6 +39,7 @@ _is_tlab(is_tlab), _result(NULL) { + _gc_cause = GCCause::_allocation_failure; } void VM_ParallelGCFailedAllocation::doit() { @@ -61,6 +62,7 @@ _size(size), _result(NULL) { + _gc_cause = GCCause::_allocation_failure; } void VM_ParallelGCFailedPermanentAllocation::doit() { --- old/src/share/vm/gc_implementation/shared/vmGCOperations.hpp 2011-01-27 10:33:20.609375000 +0100 +++ new/src/share/vm/gc_implementation/shared/vmGCOperations.hpp 2011-01-27 10:33:19.890625000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -138,6 +138,7 @@ VM_GC_Operation(0 /* total collections, dummy, ignored */, 0 /* total full collections, dummy, ignored */, request_full_gc) { + _gc_cause = GCCause::_heap_inspection; _out = out; _full_gc = request_full_gc; _need_prologue = need_prologue; @@ -163,6 +164,7 @@ : VM_GC_Operation(gc_count_before), _size(size), _tlab(tlab) { + _gc_cause = GCCause::_allocation_failure; _res = NULL; } ~VM_GenCollectForAllocation() {} --- old/src/share/vm/services/heapDumper.cpp 2011-01-27 10:33:24.546875000 +0100 +++ new/src/share/vm/services/heapDumper.cpp 2011-01-27 10:33:23.812500000 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1391,6 +1391,7 @@ VM_GC_Operation(0 /* total collections, dummy, ignored */, 0 /* total full collections, dummy, ignored */, gc_before_heap_dump) { + _gc_cause = GCCause::_heap_dump; _local_writer = writer; _gc_before_heap_dump = gc_before_heap_dump; _is_segmented_dump = false;