|
| 1 | +/* |
| 2 | + * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. |
| 3 | + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | + * |
| 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 |
| 7 | + * published by the Free Software Foundation. |
| 8 | + * |
| 9 | + * This code is distributed in the hope that it will be useful, but WITHOUT |
| 10 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 12 | + * version 2 for more details (a copy is included in the LICENSE file that |
| 13 | + * accompanied this code). |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU General Public License version |
| 16 | + * 2 along with this work; if not, write to the Free Software Foundation, |
| 17 | + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | + * |
| 19 | + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 20 | + * or visit www.oracle.com if you need additional information or have any |
| 21 | + * questions. |
| 22 | + * |
| 23 | + */ |
| 24 | + |
| 25 | +#ifndef SHARE_GC_SHENANDOAH_SHENANDOAHEVACINFO_HPP |
| 26 | +#define SHARE_GC_SHENANDOAH_SHENANDOAHEVACINFO_HPP |
| 27 | + |
| 28 | +#include "memory/allocation.hpp" |
| 29 | + |
| 30 | +class ShenandoahEvacInfo : public StackObj { |
| 31 | + // Values for ShenandoahEvacInfo jfr event, sizes stored as bytes |
| 32 | + size_t _collection_set_regions; |
| 33 | + size_t _collection_set_used_before; |
| 34 | + size_t _collection_set_used_after; |
| 35 | + size_t _collected_old; |
| 36 | + size_t _collected_promoted; |
| 37 | + size_t _collected_young; |
| 38 | + size_t _regions_promoted_humongous; |
| 39 | + size_t _regions_promoted_regular; |
| 40 | + size_t _regular_promoted_garbage; |
| 41 | + size_t _regular_promoted_free; |
| 42 | + size_t _regions_freed; |
| 43 | + size_t _regions_immediate; |
| 44 | + size_t _immediate_size; |
| 45 | + |
| 46 | +public: |
| 47 | + ShenandoahEvacInfo() : |
| 48 | + _collection_set_regions(0), _collection_set_used_before(0), _collection_set_used_after(0), |
| 49 | + _collected_old(0), _collected_promoted(0), _collected_young(0), _regions_promoted_humongous(0), |
| 50 | + _regions_promoted_regular(0), _regular_promoted_garbage(0), _regular_promoted_free(0), |
| 51 | + _regions_freed(0), _regions_immediate(0), _immediate_size(0) { } |
| 52 | + |
| 53 | + void set_collection_set_regions(size_t collection_set_regions) { |
| 54 | + _collection_set_regions = collection_set_regions; |
| 55 | + } |
| 56 | + |
| 57 | + void set_collection_set_used_before(size_t used) { |
| 58 | + _collection_set_used_before = used; |
| 59 | + } |
| 60 | + |
| 61 | + void set_collection_set_used_after(size_t used) { |
| 62 | + _collection_set_used_after = used; |
| 63 | + } |
| 64 | + |
| 65 | + void set_collected_old(size_t collected) { |
| 66 | + _collected_old = collected; |
| 67 | + } |
| 68 | + |
| 69 | + void set_collected_promoted(size_t collected) { |
| 70 | + _collected_promoted = collected; |
| 71 | + } |
| 72 | + |
| 73 | + void set_collected_young(size_t collected) { |
| 74 | + _collected_young = collected; |
| 75 | + } |
| 76 | + |
| 77 | + void set_regions_freed(size_t freed) { |
| 78 | + _regions_freed = freed; |
| 79 | + } |
| 80 | + |
| 81 | + void set_regions_promoted_humongous(size_t humongous) { |
| 82 | + _regions_promoted_humongous = humongous; |
| 83 | + } |
| 84 | + |
| 85 | + void set_regions_promoted_regular(size_t regular) { |
| 86 | + _regions_promoted_regular = regular; |
| 87 | + } |
| 88 | + |
| 89 | + void set_regular_promoted_garbage(size_t garbage) { |
| 90 | + _regular_promoted_garbage = garbage; |
| 91 | + } |
| 92 | + |
| 93 | + void set_regular_promoted_free(size_t free) { |
| 94 | + _regular_promoted_free = free; |
| 95 | + } |
| 96 | + |
| 97 | + void set_regions_immediate(size_t immediate) { |
| 98 | + _regions_immediate = immediate; |
| 99 | + } |
| 100 | + |
| 101 | + void set_immediate_size(size_t size) { |
| 102 | + _immediate_size = size; |
| 103 | + } |
| 104 | + |
| 105 | + size_t collection_set_regions() { return _collection_set_regions; } |
| 106 | + size_t collection_set_used_before() { return _collection_set_used_before; } |
| 107 | + size_t collection_set_used_after() { return _collection_set_used_after; } |
| 108 | + size_t collected_old() { return _collected_old; } |
| 109 | + size_t collected_promoted() { return _collected_promoted; } |
| 110 | + size_t collected_young() { return _collected_young; } |
| 111 | + size_t regions_promoted_humongous() { return _regions_promoted_humongous; } |
| 112 | + size_t regions_promoted_regular() { return _regions_promoted_regular; } |
| 113 | + size_t regular_promoted_garbage() { return _regular_promoted_garbage; } |
| 114 | + size_t regular_promoted_free() { return _regular_promoted_free; } |
| 115 | + size_t regions_freed() { return _regions_freed; } |
| 116 | + size_t regions_immediate() { return _regions_immediate; } |
| 117 | + size_t immediate_size() { return _immediate_size; } |
| 118 | +}; |
| 119 | + |
| 120 | +#endif // SHARE_GC_SHENANDOAH_SHENANDOAHEVACINFO_HPP |
0 commit comments