1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
https://liuxiaofei.com.cn/blog/entry_point-jvm-java%e6%a0%88%e6%a1%a2%e7%9a%84%e5%88%9b%e5%bb%ba/
entry_point–JVM Java
Content:
entry_point
--------
InterpreterGenerator::generate_normal_entry() at templateInterpreter_x86_64.cpp:1,409 0x7ffff74a829d
AbstractInterpreterGenerator::generate_method_entry() at templateInterpreter_x86_64.cpp:1,660 0x7ffff74a8f81
TemplateInterpreterGenerator::generate_all() at templateInterpreter.cpp:369 0x7ffff749f303
InterpreterGenerator::InterpreterGenerator() at templateInterpreter_x86_64.cpp:2,051 0x7ffff74aa85f
TemplateInterpreter::initialize() at templateInterpreter.cpp:52 0x7ffff749dc67
interpreter_init() at interpreter.cpp:118 0x7ffff70df96e
init_globals() at init.cpp:107 0x7ffff7080d21
Threads::create_vm() at thread.cpp:3,424 0x7ffff74cc509
JNI_CreateJavaVM() at jni.cpp:5,166 0x7ffff7134f13
entry_point
-----------------
/hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp:1410
//
// Generic interpreted method entry to (asm) interpreter
//
address InterpreterGenerator::generate_normal_entry(bool synchronized) {
// determine code generation flags
bool inc_counter = UseCompiler || CountCompiledCalls;
// ebx: Method*
// r13: sender sp (ebx
r13
call_stub
)
address entry_point = __ pc();//entry_point
const Address constMethod(rbx, Method::const_offset());//
constMethod
,rbx
method
const Address access_flags(rbx, Method::access_flags_offset());
const Address size_of_parameters(rdx,
ConstMethod::size_of_parameters_offset());//
parameter
local
const Address size_of_locals(rdx, ConstMethod::size_of_locals_offset());
//
,
// get parameter size (always needed)
__ movptr(rdx, constMethod);//
constMethod
,
rdx
__ load_unsigned_short(rcx, size_of_parameters);//
parameter
,
rcx
//rbx:
;rcx:
;rdx:
;rax:
(
)
// rbx: Method*
// rcx: size of parameters
// r13: sender_sp (could differ from sp+wordSize if we were called via c2i )
__ load_unsigned_short(rdx, size_of_locals); // get size of locals in words
__ subl(rdx, rcx); // rdx = no. of additional locals
//
call_stub
,
entry_point
,
// YYY
// __ incrementl(rdx);
// __ andl(rdx, -2);
// see if we've got enough room on the stack for locals plus overhead.
generate_stack_overflow_check();
//
call_stub
,
rax,
:
// [parameter 1]
// [parameter 2]
// ......
// [parameter n]
// [return address]
// [local 1]
// [local 2]
// ......
// [local n]
//
return address
,
,
// get return address
__ pop(rax);
// compute beginning of parameters (r14)
:
+
* 8 -
//
,
,
,
n-1
__ lea(r14, Address(rsp, rcx, Address::times_8, -wordSize));
//
0
// rdx - # of additional locals
// allocate space for locals
.entry_point–JVM Java
.txt 1/1/2020 8:15 AM
Page 1 of 6
评论0
最新资源