annotate src/share/vm/c1/c1_MacroAssembler.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 0bf37f737702
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 2426
diff changeset
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1295
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1295
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: 1295
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #ifndef SHARE_VM_C1_C1_MACROASSEMBLER_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #define SHARE_VM_C1_C1_MACROASSEMBLER_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27
7199
cd3d6a6b95d9 8003240: x86: move MacroAssembler into separate file
twisti
parents: 6725
diff changeset
28 #include "asm/macroAssembler.hpp"
cd3d6a6b95d9 8003240: x86: move MacroAssembler into separate file
twisti
parents: 6725
diff changeset
29 #include "asm/macroAssembler.inline.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
30
0
a61af66fc99e Initial load
duke
parents:
diff changeset
31 class CodeEmitInfo;
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 class C1_MacroAssembler: public MacroAssembler {
a61af66fc99e Initial load
duke
parents:
diff changeset
34 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // creation
a61af66fc99e Initial load
duke
parents:
diff changeset
36 C1_MacroAssembler(CodeBuffer* code) : MacroAssembler(code) { pd_init(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 //----------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
39 void explicit_null_check(Register base);
a61af66fc99e Initial load
duke
parents:
diff changeset
40
a61af66fc99e Initial load
duke
parents:
diff changeset
41 void inline_cache_check(Register receiver, Register iCache);
17980
0bf37f737702 8032410: compiler/uncommontrap/TestStackBangRbp.java times out on Solaris-Sparc V9
roland
parents: 7199
diff changeset
42 void build_frame(int frame_size_in_bytes, int bang_size_in_bytes);
1295
3cf667df43ef 6919934: JSR 292 needs to support x86 C1
twisti
parents: 0
diff changeset
43 void remove_frame(int frame_size_in_bytes);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 void unverified_entry(Register receiver, Register ic_klass);
a61af66fc99e Initial load
duke
parents:
diff changeset
46 void verified_entry();
a61af66fc99e Initial load
duke
parents:
diff changeset
47 void verify_stack_oop(int offset) PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
48 void verify_not_null_oop(Register r) PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
49
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
50 #ifdef TARGET_ARCH_x86
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
51 # include "c1_MacroAssembler_x86.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
52 #endif
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
53 #ifdef TARGET_ARCH_sparc
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
54 # include "c1_MacroAssembler_sparc.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
55 #endif
2192
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 1972
diff changeset
56 #ifdef TARGET_ARCH_arm
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 1972
diff changeset
57 # include "c1_MacroAssembler_arm.hpp"
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 1972
diff changeset
58 #endif
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 1972
diff changeset
59 #ifdef TARGET_ARCH_ppc
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 1972
diff changeset
60 # include "c1_MacroAssembler_ppc.hpp"
b92c45f2bc75 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 1972
diff changeset
61 #endif
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
62
0
a61af66fc99e Initial load
duke
parents:
diff changeset
63 };
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 // A StubAssembler is a MacroAssembler w/ extra functionality for runtime
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // stubs. Currently it 'knows' some stub info. Eventually, the information
a61af66fc99e Initial load
duke
parents:
diff changeset
69 // may be set automatically or can be asserted when using specialised
a61af66fc99e Initial load
duke
parents:
diff changeset
70 // StubAssembler functions.
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 class StubAssembler: public C1_MacroAssembler {
a61af66fc99e Initial load
duke
parents:
diff changeset
73 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
74 const char* _name;
a61af66fc99e Initial load
duke
parents:
diff changeset
75 bool _must_gc_arguments;
a61af66fc99e Initial load
duke
parents:
diff changeset
76 int _frame_size;
a61af66fc99e Initial load
duke
parents:
diff changeset
77 int _num_rt_args;
a61af66fc99e Initial load
duke
parents:
diff changeset
78 int _stub_id;
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
81 // creation
a61af66fc99e Initial load
duke
parents:
diff changeset
82 StubAssembler(CodeBuffer* code, const char * name, int stub_id);
a61af66fc99e Initial load
duke
parents:
diff changeset
83 void set_info(const char* name, bool must_gc_arguments);
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 void set_frame_size(int size);
a61af66fc99e Initial load
duke
parents:
diff changeset
86 void set_num_rt_args(int args);
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 // accessors
a61af66fc99e Initial load
duke
parents:
diff changeset
89 const char* name() const { return _name; }
a61af66fc99e Initial load
duke
parents:
diff changeset
90 bool must_gc_arguments() const { return _must_gc_arguments; }
a61af66fc99e Initial load
duke
parents:
diff changeset
91 int frame_size() const { return _frame_size; }
a61af66fc99e Initial load
duke
parents:
diff changeset
92 int num_rt_args() const { return _num_rt_args; }
a61af66fc99e Initial load
duke
parents:
diff changeset
93 int stub_id() const { return _stub_id; }
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 // runtime calls (return offset of call to be used by GC map)
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 2426
diff changeset
96 int call_RT(Register oop_result1, Register metadata_result, address entry, int args_size = 0);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 2426
diff changeset
97 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 2426
diff changeset
98 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2);
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 2426
diff changeset
99 int call_RT(Register oop_result1, Register metadata_result, address entry, Register arg1, Register arg2, Register arg3);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
100 };
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
101
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
102 #endif // SHARE_VM_C1_C1_MACROASSEMBLER_HPP