Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/vm_operations_g1.hpp @ 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 | 631f79e71e90 |
children | db89aa49298f |
comparison
equal
deleted
inserted
replaced
2189:176d0be30214 | 2225:c798c277ddd1 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 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. |
42 bool _pause_succeeded; | 42 bool _pause_succeeded; |
43 | 43 |
44 public: | 44 public: |
45 VM_G1OperationWithAllocRequest(unsigned int gc_count_before, | 45 VM_G1OperationWithAllocRequest(unsigned int gc_count_before, |
46 size_t word_size) | 46 size_t word_size) |
47 : VM_GC_Operation(gc_count_before), | 47 : VM_GC_Operation(gc_count_before, GCCause::_allocation_failure), |
48 _word_size(word_size), _result(NULL), _pause_succeeded(false) { } | 48 _word_size(word_size), _result(NULL), _pause_succeeded(false) { } |
49 HeapWord* result() { return _result; } | 49 HeapWord* result() { return _result; } |
50 bool pause_succeeded() { return _pause_succeeded; } | 50 bool pause_succeeded() { return _pause_succeeded; } |
51 }; | 51 }; |
52 | 52 |
53 class VM_G1CollectFull: public VM_GC_Operation { | 53 class VM_G1CollectFull: public VM_GC_Operation { |
54 public: | 54 public: |
55 VM_G1CollectFull(unsigned int gc_count_before, | 55 VM_G1CollectFull(unsigned int gc_count_before, |
56 unsigned int full_gc_count_before, | 56 unsigned int full_gc_count_before, |
57 GCCause::Cause cause) | 57 GCCause::Cause cause) |
58 : VM_GC_Operation(gc_count_before, full_gc_count_before) { | 58 : VM_GC_Operation(gc_count_before, cause, full_gc_count_before) { } |
59 _gc_cause = cause; | |
60 } | |
61 virtual VMOp_Type type() const { return VMOp_G1CollectFull; } | 59 virtual VMOp_Type type() const { return VMOp_G1CollectFull; } |
62 virtual void doit(); | 60 virtual void doit(); |
63 virtual const char* name() const { | 61 virtual const char* name() const { |
64 return "full garbage-first collection"; | 62 return "full garbage-first collection"; |
65 } | 63 } |