author | tschatzl |
Thu, 21 Nov 2019 11:42:54 +0100 | |
changeset 59198 | 92c98aa0f801 |
parent 53411 | aa87f38fcba2 |
permissions | -rw-r--r-- |
18025 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. |
18025 | 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 |
||
53411
aa87f38fcba2
8217374: Rename G1 EvacuationInfo class to G1EvacuationInfo
tschatzl
parents:
53244
diff
changeset
|
25 |
#ifndef SHARE_GC_G1_G1EVACUATIONINFO_HPP |
aa87f38fcba2
8217374: Rename G1 EvacuationInfo class to G1EvacuationInfo
tschatzl
parents:
53244
diff
changeset
|
26 |
#define SHARE_GC_G1_G1EVACUATIONINFO_HPP |
18025 | 27 |
|
28 |
#include "memory/allocation.hpp" |
|
29 |
||
53411
aa87f38fcba2
8217374: Rename G1 EvacuationInfo class to G1EvacuationInfo
tschatzl
parents:
53244
diff
changeset
|
30 |
class G1EvacuationInfo : public StackObj { |
18025 | 31 |
uint _collectionset_regions; |
32 |
uint _allocation_regions; |
|
33 |
size_t _collectionset_used_before; |
|
34 |
size_t _collectionset_used_after; |
|
35 |
size_t _alloc_regions_used_before; |
|
59198
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
36 |
size_t _bytes_used; |
18025 | 37 |
uint _regions_freed; |
38 |
||
39 |
public: |
|
59198
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
40 |
G1EvacuationInfo() : |
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
41 |
_collectionset_regions(0), _allocation_regions(0), _collectionset_used_before(0), |
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
42 |
_collectionset_used_after(0), _alloc_regions_used_before(0), |
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
43 |
_bytes_used(0), _regions_freed(0) { } |
18025 | 44 |
|
45 |
void set_collectionset_regions(uint collectionset_regions) { |
|
46 |
_collectionset_regions = collectionset_regions; |
|
47 |
} |
|
48 |
||
49 |
void set_allocation_regions(uint allocation_regions) { |
|
50 |
_allocation_regions = allocation_regions; |
|
51 |
} |
|
52 |
||
53 |
void set_collectionset_used_before(size_t used) { |
|
54 |
_collectionset_used_before = used; |
|
55 |
} |
|
56 |
||
57 |
void increment_collectionset_used_after(size_t used) { |
|
58 |
_collectionset_used_after += used; |
|
59 |
} |
|
60 |
||
61 |
void set_alloc_regions_used_before(size_t used) { |
|
62 |
_alloc_regions_used_before = used; |
|
63 |
} |
|
64 |
||
59198
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
65 |
void set_bytes_used(size_t used) { |
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
66 |
_bytes_used = used; |
18025 | 67 |
} |
68 |
||
69 |
void set_regions_freed(uint freed) { |
|
70 |
_regions_freed += freed; |
|
71 |
} |
|
72 |
||
73 |
uint collectionset_regions() { return _collectionset_regions; } |
|
74 |
uint allocation_regions() { return _allocation_regions; } |
|
75 |
size_t collectionset_used_before() { return _collectionset_used_before; } |
|
76 |
size_t collectionset_used_after() { return _collectionset_used_after; } |
|
77 |
size_t alloc_regions_used_before() { return _alloc_regions_used_before; } |
|
59198
92c98aa0f801
8228609: G1 copy cost prediction uses used vs. actual copied byte
tschatzl
parents:
53411
diff
changeset
|
78 |
size_t bytes_used() { return _bytes_used; } |
18025 | 79 |
uint regions_freed() { return _regions_freed; } |
80 |
}; |
|
81 |
||
53411
aa87f38fcba2
8217374: Rename G1 EvacuationInfo class to G1EvacuationInfo
tschatzl
parents:
53244
diff
changeset
|
82 |
#endif // SHARE_GC_G1_G1EVACUATIONINFO_HPP |