comparison src/share/vm/gc_implementation/parallelScavenge/vmPSOperations.cpp @ 2225:c798c277ddd1

7015169: GC Cause not always set Summary: Sometimes the gc cause was not always set. This caused JStat to print the wrong information. Reviewed-by: tonyp, ysr Contributed-by: suenaga.yasumasa@oss.ntt.co.jp
author brutisso
date Thu, 03 Feb 2011 20:49:09 -0800
parents 7246a374a9f2
children c9ca3f51cf41
comparison
equal deleted inserted replaced
2189:176d0be30214 2225:c798c277ddd1
1 /* 1 /*
2 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
32 #include "utilities/dtrace.hpp" 32 #include "utilities/dtrace.hpp"
33 33
34 // The following methods are used by the parallel scavenge collector 34 // The following methods are used by the parallel scavenge collector
35 VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size, 35 VM_ParallelGCFailedAllocation::VM_ParallelGCFailedAllocation(size_t size,
36 bool is_tlab, unsigned int gc_count) : 36 bool is_tlab, unsigned int gc_count) :
37 VM_GC_Operation(gc_count), 37 VM_GC_Operation(gc_count, GCCause::_allocation_failure),
38 _size(size), 38 _size(size),
39 _is_tlab(is_tlab), 39 _is_tlab(is_tlab),
40 _result(NULL) 40 _result(NULL)
41 { 41 {
42 } 42 }
55 } 55 }
56 } 56 }
57 57
58 VM_ParallelGCFailedPermanentAllocation::VM_ParallelGCFailedPermanentAllocation(size_t size, 58 VM_ParallelGCFailedPermanentAllocation::VM_ParallelGCFailedPermanentAllocation(size_t size,
59 unsigned int gc_count, unsigned int full_gc_count) : 59 unsigned int gc_count, unsigned int full_gc_count) :
60 VM_GC_Operation(gc_count, full_gc_count, true /* full */), 60 VM_GC_Operation(gc_count, GCCause::_allocation_failure, full_gc_count, true /* full */),
61 _size(size), 61 _size(size),
62 _result(NULL) 62 _result(NULL)
63 { 63 {
64 } 64 }
65 65
78 78
79 // Only used for System.gc() calls 79 // Only used for System.gc() calls
80 VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count, 80 VM_ParallelGCSystemGC::VM_ParallelGCSystemGC(unsigned int gc_count,
81 unsigned int full_gc_count, 81 unsigned int full_gc_count,
82 GCCause::Cause gc_cause) : 82 GCCause::Cause gc_cause) :
83 VM_GC_Operation(gc_count, full_gc_count, true /* full */) 83 VM_GC_Operation(gc_count, gc_cause, full_gc_count, true /* full */)
84 { 84 {
85 _gc_cause = gc_cause;
86 } 85 }
87 86
88 void VM_ParallelGCSystemGC::doit() { 87 void VM_ParallelGCSystemGC::doit() {
89 SvcGCMarker sgcm(SvcGCMarker::FULL); 88 SvcGCMarker sgcm(SvcGCMarker::FULL);
90 89