Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp @ 10405:f2110083203d
8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author | sla |
---|---|
date | Mon, 10 Jun 2013 11:30:51 +0200 |
parents | 47bdfb3d010f |
children |
comparison
equal
deleted
inserted
replaced
10404:d0add7016434 | 10405:f2110083203d |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2002, 2013, 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. |
26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSSCAVENGE_HPP | 26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSSCAVENGE_HPP |
27 | 27 |
28 #include "gc_implementation/parallelScavenge/cardTableExtension.hpp" | 28 #include "gc_implementation/parallelScavenge/cardTableExtension.hpp" |
29 #include "gc_implementation/parallelScavenge/psVirtualspace.hpp" | 29 #include "gc_implementation/parallelScavenge/psVirtualspace.hpp" |
30 #include "gc_implementation/shared/collectorCounters.hpp" | 30 #include "gc_implementation/shared/collectorCounters.hpp" |
31 #include "gc_implementation/shared/gcTrace.hpp" | |
31 #include "memory/allocation.hpp" | 32 #include "memory/allocation.hpp" |
32 #include "oops/oop.hpp" | 33 #include "oops/oop.hpp" |
33 #include "utilities/stack.hpp" | 34 #include "utilities/stack.hpp" |
34 | 35 |
35 class GCTaskManager; | 36 class GCTaskManager; |
36 class GCTaskQueue; | 37 class GCTaskQueue; |
37 class OopStack; | 38 class OopStack; |
38 class ReferenceProcessor; | 39 class ReferenceProcessor; |
39 class ParallelScavengeHeap; | 40 class ParallelScavengeHeap; |
41 class ParallelScavengeTracer; | |
40 class PSIsAliveClosure; | 42 class PSIsAliveClosure; |
41 class PSRefProcTaskExecutor; | 43 class PSRefProcTaskExecutor; |
44 class STWGCTimer; | |
42 | 45 |
43 class PSScavenge: AllStatic { | 46 class PSScavenge: AllStatic { |
44 friend class PSIsAliveClosure; | 47 friend class PSIsAliveClosure; |
45 friend class PSKeepAliveClosure; | 48 friend class PSKeepAliveClosure; |
46 friend class PSPromotionManager; | 49 friend class PSPromotionManager; |
66 static PSIsAliveClosure _is_alive_closure; // Closure used for reference processing | 69 static PSIsAliveClosure _is_alive_closure; // Closure used for reference processing |
67 static CardTableExtension* _card_table; // We cache the card table for fast access. | 70 static CardTableExtension* _card_table; // We cache the card table for fast access. |
68 static bool _survivor_overflow; // Overflow this collection | 71 static bool _survivor_overflow; // Overflow this collection |
69 static uint _tenuring_threshold; // tenuring threshold for next scavenge | 72 static uint _tenuring_threshold; // tenuring threshold for next scavenge |
70 static elapsedTimer _accumulated_time; // total time spent on scavenge | 73 static elapsedTimer _accumulated_time; // total time spent on scavenge |
74 static STWGCTimer _gc_timer; // GC time book keeper | |
75 static ParallelScavengeTracer _gc_tracer; // GC tracing | |
71 // The lowest address possible for the young_gen. | 76 // The lowest address possible for the young_gen. |
72 // This is used to decide if an oop should be scavenged, | 77 // This is used to decide if an oop should be scavenged, |
73 // cards should be marked, etc. | 78 // cards should be marked, etc. |
74 static HeapWord* _young_generation_boundary; | 79 static HeapWord* _young_generation_boundary; |
75 // Used to optimize compressed oops young gen boundary checking. | 80 // Used to optimize compressed oops young gen boundary checking. |
76 static uintptr_t _young_generation_boundary_compressed; | 81 static uintptr_t _young_generation_boundary_compressed; |
77 static Stack<markOop, mtGC> _preserved_mark_stack; // List of marks to be restored after failed promotion | 82 static Stack<markOop, mtGC> _preserved_mark_stack; // List of marks to be restored after failed promotion |
78 static Stack<oop, mtGC> _preserved_oop_stack; // List of oops that need their mark restored. | 83 static Stack<oop, mtGC> _preserved_oop_stack; // List of oops that need their mark restored. |
79 static CollectorCounters* _counters; // collector performance counters | 84 static CollectorCounters* _counters; // collector performance counters |
80 static bool _promotion_failed; | |
81 | 85 |
82 static void clean_up_failed_promotion(); | 86 static void clean_up_failed_promotion(); |
83 | 87 |
84 static bool should_attempt_scavenge(); | 88 static bool should_attempt_scavenge(); |
85 | 89 |
91 | 95 |
92 public: | 96 public: |
93 // Accessors | 97 // Accessors |
94 static uint tenuring_threshold() { return _tenuring_threshold; } | 98 static uint tenuring_threshold() { return _tenuring_threshold; } |
95 static elapsedTimer* accumulated_time() { return &_accumulated_time; } | 99 static elapsedTimer* accumulated_time() { return &_accumulated_time; } |
96 static bool promotion_failed() { return _promotion_failed; } | |
97 static int consecutive_skipped_scavenges() | 100 static int consecutive_skipped_scavenges() |
98 { return _consecutive_skipped_scavenges; } | 101 { return _consecutive_skipped_scavenges; } |
99 | 102 |
100 // Performance Counters | 103 // Performance Counters |
101 static CollectorCounters* counters() { return _counters; } | 104 static CollectorCounters* counters() { return _counters; } |