Mercurial > hg > truffle
annotate src/share/vm/memory/tenuredGeneration.hpp @ 20543:e7d0505c8a30
8059758: Footprint regressions with JDK-8038423
Summary: Changes in JDK-8038423 always initialize (zero out) virtual memory used for auxiliary data structures. This causes a footprint regression for G1 in startup benchmarks. This is because they do not touch that memory at all, so the operating system does not actually commit these pages. The fix is to, if the initialization value of the data structures matches the default value of just committed memory (=0), do not do anything.
Reviewed-by: jwilhelm, brutisso
author | tschatzl |
---|---|
date | Fri, 10 Oct 2014 15:51:58 +0200 |
parents | 55fb97c4c58d |
children | 4ca6dc0799b6 |
rev | line source |
---|---|
0 | 1 /* |
17467
55fb97c4c58d
8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents:
9072
diff
changeset
|
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
470
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
470
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
470
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_MEMORY_TENUREDGENERATION_HPP |
26 #define SHARE_VM_MEMORY_TENUREDGENERATION_HPP | |
27 | |
28 #include "gc_implementation/shared/cSpaceCounters.hpp" | |
29 #include "gc_implementation/shared/gcStats.hpp" | |
30 #include "gc_implementation/shared/generationCounters.hpp" | |
31 #include "memory/generation.hpp" | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
1972
diff
changeset
|
32 #include "utilities/macros.hpp" |
1972 | 33 |
0 | 34 // TenuredGeneration models the heap containing old (promoted/tenured) objects. |
35 | |
36 class ParGCAllocBufferWithBOT; | |
37 | |
38 class TenuredGeneration: public OneContigSpaceCardGeneration { | |
39 friend class VMStructs; | |
40 protected: | |
41 | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
1972
diff
changeset
|
42 #if INCLUDE_ALL_GCS |
0 | 43 // To support parallel promotion: an array of parallel allocation |
44 // buffers, one per thread, initially NULL. | |
45 ParGCAllocBufferWithBOT** _alloc_buffers; | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
1972
diff
changeset
|
46 #endif // INCLUDE_ALL_GCS |
0 | 47 |
48 // Retire all alloc buffers before a full GC, so that they will be | |
49 // re-allocated at the start of the next young GC. | |
50 void retire_alloc_buffers_before_full_gc(); | |
51 | |
52 GenerationCounters* _gen_counters; | |
53 CSpaceCounters* _space_counters; | |
54 | |
55 public: | |
56 TenuredGeneration(ReservedSpace rs, size_t initial_byte_size, int level, | |
57 GenRemSet* remset); | |
58 | |
59 Generation::Name kind() { return Generation::MarkSweepCompact; } | |
60 | |
61 // Printing | |
62 const char* name() const; | |
63 const char* short_name() const { return "Tenured"; } | |
64 bool must_be_youngest() const { return false; } | |
65 bool must_be_oldest() const { return true; } | |
66 | |
67 // Does a "full" (forced) collection invoked on this generation collect | |
68 // all younger generations as well? Note that this is a | |
69 // hack to allow the collection of the younger gen first if the flag is | |
70 // set. This is better than using th policy's should_collect_gen0_first() | |
71 // since that causes us to do an extra unnecessary pair of restart-&-stop-world. | |
72 virtual bool full_collects_younger_generations() const { | |
73 return !CollectGen0First; | |
74 } | |
75 | |
76 virtual void gc_prologue(bool full); | |
77 virtual void gc_epilogue(bool full); | |
78 bool should_collect(bool full, | |
79 size_t word_size, | |
80 bool is_tlab); | |
81 | |
82 virtual void collect(bool full, | |
83 bool clear_all_soft_refs, | |
84 size_t size, | |
85 bool is_tlab); | |
9072
8617e38bb4cb
8008508: CMS does not correctly reduce heap size after a Full GC
jmasa
parents:
8001
diff
changeset
|
86 virtual void compute_new_size(); |
0 | 87 |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
1972
diff
changeset
|
88 #if INCLUDE_ALL_GCS |
0 | 89 // Overrides. |
90 virtual oop par_promote(int thread_num, | |
91 oop obj, markOop m, size_t word_sz); | |
92 virtual void par_promote_alloc_undo(int thread_num, | |
93 HeapWord* obj, size_t word_sz); | |
94 virtual void par_promote_alloc_done(int thread_num); | |
8001
db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
jprovino
parents:
1972
diff
changeset
|
95 #endif // INCLUDE_ALL_GCS |
0 | 96 |
97 // Performance Counter support | |
98 void update_counters(); | |
99 | |
100 // Statistics | |
101 | |
102 virtual void update_gc_stats(int level, bool full); | |
103 | |
1888
a7214d79fcf1
6896603: CMS/GCH: collection_attempt_is_safe() ergo should use more recent data
ysr
parents:
1552
diff
changeset
|
104 virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const; |
0 | 105 |
106 void verify_alloc_buffers_clean(); | |
107 }; | |
1972 | 108 |
109 #endif // SHARE_VM_MEMORY_TENUREDGENERATION_HPP |