Mercurial > hg > graal-jvmci-8
annotate src/share/vm/gc_implementation/g1/g1AllocationContext.hpp @ 20619:b12a2a9b05ca
8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
Reviewed-by: mgerdin, coleenp, bdelsart
author | stefank |
---|---|
date | Thu, 02 Oct 2014 10:55:36 +0200 |
parents | fa6c442c59ee |
children | 8d27d6113625 |
rev | line source |
---|---|
20404
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
1 /* |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
4 * |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
8 * |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
13 * accompanied this code). |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
14 * |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
18 * |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
21 * questions. |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
22 * |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
23 */ |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
24 |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
27 |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
28 #include "memory/allocation.hpp" |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
29 |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
30 typedef unsigned char AllocationContext_t; |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
31 |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
32 class AllocationContext : AllStatic { |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
33 public: |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
34 // Currently used context |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
35 static AllocationContext_t current() { |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
36 return 0; |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
37 } |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
38 // System wide default context |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
39 static AllocationContext_t system() { |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
40 return 0; |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
41 } |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
42 }; |
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
43 |
20445
e5668dcf12e9
8057818: collect allocation context statistics at gc pauses
jcoomes
parents:
20404
diff
changeset
|
44 class AllocationContextStats: public StackObj { |
e5668dcf12e9
8057818: collect allocation context statistics at gc pauses
jcoomes
parents:
20404
diff
changeset
|
45 public: |
e5668dcf12e9
8057818: collect allocation context statistics at gc pauses
jcoomes
parents:
20404
diff
changeset
|
46 inline void clear() { } |
e5668dcf12e9
8057818: collect allocation context statistics at gc pauses
jcoomes
parents:
20404
diff
changeset
|
47 inline void update(bool full_gc) { } |
e5668dcf12e9
8057818: collect allocation context statistics at gc pauses
jcoomes
parents:
20404
diff
changeset
|
48 inline void update_at_remark() { } |
20450
fa6c442c59ee
8057827: notify an obj when allocation context stats are available
jcoomes
parents:
20445
diff
changeset
|
49 inline bool available() { return false; } |
20445
e5668dcf12e9
8057818: collect allocation context statistics at gc pauses
jcoomes
parents:
20404
diff
changeset
|
50 }; |
e5668dcf12e9
8057818: collect allocation context statistics at gc pauses
jcoomes
parents:
20404
diff
changeset
|
51 |
20404
227a9e5e4b4a
8057536: Refactor G1 to allow context specific allocations
sjohanss
parents:
diff
changeset
|
52 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1ALLOCATIONCONTEXT_HPP |