Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
77c96c30
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
77c96c30
编写于
4月 01, 2018
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
99d78559
53010b95
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
72 addition
and
38 deletion
+72
-38
.hgtags
.hgtags
+1
-0
src/share/vm/code/codeBlob.cpp
src/share/vm/code/codeBlob.cpp
+23
-1
src/share/vm/code/codeBlob.hpp
src/share/vm/code/codeBlob.hpp
+15
-1
src/share/vm/code/compiledIC.cpp
src/share/vm/code/compiledIC.cpp
+7
-5
src/share/vm/code/vtableStubs.cpp
src/share/vm/code/vtableStubs.cpp
+7
-6
src/share/vm/code/vtableStubs.hpp
src/share/vm/code/vtableStubs.hpp
+2
-2
src/share/vm/oops/compiledICHolder.cpp
src/share/vm/oops/compiledICHolder.cpp
+1
-19
src/share/vm/oops/compiledICHolder.hpp
src/share/vm/oops/compiledICHolder.hpp
+16
-4
未找到文件。
.hgtags
浏览文件 @
77c96c30
...
@@ -1137,6 +1137,7 @@ bf2e8b1e8e8e6bc1f9b9475de54ba0329a6b24b1 jdk8u162-b34
...
@@ -1137,6 +1137,7 @@ bf2e8b1e8e8e6bc1f9b9475de54ba0329a6b24b1 jdk8u162-b34
9b3f207379cf6ecfb8603640269e31ff4e064294 jdk8u162-b35
9b3f207379cf6ecfb8603640269e31ff4e064294 jdk8u162-b35
d2ebd6530396b0afc700cd1a8eaf1f7a7f9fce8d jdk8u162-b36
d2ebd6530396b0afc700cd1a8eaf1f7a7f9fce8d jdk8u162-b36
700ad8745f3fdc5ba3702616fc5ed6a6248dfa78 jdk8u162-b37
700ad8745f3fdc5ba3702616fc5ed6a6248dfa78 jdk8u162-b37
405800ccc4c7b81475b01392f2145cc3675d1f86 jdk8u162-b38
a17bab9405474602b18cd62e060a09b17d6413ac jdk8u171-b00
a17bab9405474602b18cd62e060a09b17d6413ac jdk8u171-b00
ebfd57cc21e6b7f0c22b17c666b6b28c9340e207 jdk8u171-b01
ebfd57cc21e6b7f0c22b17c666b6b28c9340e207 jdk8u171-b01
1acd7c1b80241def8fac90f70b0df16356adad47 jdk8u171-b02
1acd7c1b80241def8fac90f70b0df16356adad47 jdk8u171-b02
...
...
src/share/vm/code/codeBlob.cpp
浏览文件 @
77c96c30
/*
/*
* Copyright (c) 1998, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -289,6 +289,28 @@ AdapterBlob* AdapterBlob::create(CodeBuffer* cb) {
...
@@ -289,6 +289,28 @@ AdapterBlob* AdapterBlob::create(CodeBuffer* cb) {
return
blob
;
return
blob
;
}
}
VtableBlob
::
VtableBlob
(
const
char
*
name
,
int
size
)
:
BufferBlob
(
name
,
size
)
{
}
VtableBlob
*
VtableBlob
::
create
(
const
char
*
name
,
int
buffer_size
)
{
ThreadInVMfromUnknown
__tiv
;
// get to VM state in case we block on CodeCache_lock
VtableBlob
*
blob
=
NULL
;
unsigned
int
size
=
sizeof
(
VtableBlob
);
// align the size to CodeEntryAlignment
size
=
align_code_offset
(
size
);
size
+=
round_to
(
buffer_size
,
oopSize
);
assert
(
name
!=
NULL
,
"must provide a name"
);
{
MutexLockerEx
mu
(
CodeCache_lock
,
Mutex
::
_no_safepoint_check_flag
);
blob
=
new
(
size
)
VtableBlob
(
name
,
size
);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService
::
track_code_cache_memory_usage
();
return
blob
;
}
//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------
// Implementation of MethodHandlesAdapterBlob
// Implementation of MethodHandlesAdapterBlob
...
...
src/share/vm/code/codeBlob.hpp
浏览文件 @
77c96c30
/*
/*
* Copyright (c) 1998, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -101,6 +101,7 @@ class CodeBlob VALUE_OBJ_CLASS_SPEC {
...
@@ -101,6 +101,7 @@ class CodeBlob VALUE_OBJ_CLASS_SPEC {
virtual
bool
is_exception_stub
()
const
{
return
false
;
}
virtual
bool
is_exception_stub
()
const
{
return
false
;
}
virtual
bool
is_safepoint_stub
()
const
{
return
false
;
}
virtual
bool
is_safepoint_stub
()
const
{
return
false
;
}
virtual
bool
is_adapter_blob
()
const
{
return
false
;
}
virtual
bool
is_adapter_blob
()
const
{
return
false
;
}
virtual
bool
is_vtable_blob
()
const
{
return
false
;
}
virtual
bool
is_method_handles_adapter_blob
()
const
{
return
false
;
}
virtual
bool
is_method_handles_adapter_blob
()
const
{
return
false
;
}
virtual
bool
is_compiled_by_c2
()
const
{
return
false
;
}
virtual
bool
is_compiled_by_c2
()
const
{
return
false
;
}
...
@@ -202,6 +203,7 @@ class CodeBlob VALUE_OBJ_CLASS_SPEC {
...
@@ -202,6 +203,7 @@ class CodeBlob VALUE_OBJ_CLASS_SPEC {
class
BufferBlob
:
public
CodeBlob
{
class
BufferBlob
:
public
CodeBlob
{
friend
class
VMStructs
;
friend
class
VMStructs
;
friend
class
AdapterBlob
;
friend
class
AdapterBlob
;
friend
class
VtableBlob
;
friend
class
MethodHandlesAdapterBlob
;
friend
class
MethodHandlesAdapterBlob
;
private:
private:
...
@@ -246,6 +248,18 @@ public:
...
@@ -246,6 +248,18 @@ public:
virtual
bool
is_adapter_blob
()
const
{
return
true
;
}
virtual
bool
is_adapter_blob
()
const
{
return
true
;
}
};
};
//---------------------------------------------------------------------------------------------------
class
VtableBlob
:
public
BufferBlob
{
private:
VtableBlob
(
const
char
*
,
int
);
public:
// Creation
static
VtableBlob
*
create
(
const
char
*
name
,
int
buffer_size
);
// Typing
virtual
bool
is_vtable_blob
()
const
{
return
true
;
}
};
//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------
// MethodHandlesAdapterBlob: used to hold MethodHandles adapters
// MethodHandlesAdapterBlob: used to hold MethodHandles adapters
...
...
src/share/vm/code/compiledIC.cpp
浏览文件 @
77c96c30
/*
/*
* Copyright (c) 1997, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -232,7 +232,7 @@ bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecod
...
@@ -232,7 +232,7 @@ bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecod
assert
(
k
->
verify_itable_index
(
itable_index
),
"sanity check"
);
assert
(
k
->
verify_itable_index
(
itable_index
),
"sanity check"
);
#endif //ASSERT
#endif //ASSERT
CompiledICHolder
*
holder
=
new
CompiledICHolder
(
call_info
->
resolved_method
()
->
method_holder
(),
CompiledICHolder
*
holder
=
new
CompiledICHolder
(
call_info
->
resolved_method
()
->
method_holder
(),
call_info
->
resolved_klass
()());
call_info
->
resolved_klass
()()
,
false
);
holder
->
claim
();
holder
->
claim
();
InlineCacheBuffer
::
create_transition_stub
(
this
,
holder
,
entry
);
InlineCacheBuffer
::
create_transition_stub
(
this
,
holder
,
entry
);
}
else
{
}
else
{
...
@@ -270,7 +270,7 @@ bool CompiledIC::is_megamorphic() const {
...
@@ -270,7 +270,7 @@ bool CompiledIC::is_megamorphic() const {
assert
(
!
is_optimized
(),
"an optimized call cannot be megamorphic"
);
assert
(
!
is_optimized
(),
"an optimized call cannot be megamorphic"
);
// Cannot rely on cached_value. It is either an interface or a method.
// Cannot rely on cached_value. It is either an interface or a method.
return
VtableStubs
::
is_entry_point
(
ic_destination
())
;
return
VtableStubs
::
entry_point
(
ic_destination
())
!=
NULL
;
}
}
bool
CompiledIC
::
is_call_to_compiled
()
const
{
bool
CompiledIC
::
is_call_to_compiled
()
const
{
...
@@ -534,9 +534,11 @@ bool CompiledIC::is_icholder_entry(address entry) {
...
@@ -534,9 +534,11 @@ bool CompiledIC::is_icholder_entry(address entry) {
return
true
;
return
true
;
}
}
// itable stubs also use CompiledICHolder
// itable stubs also use CompiledICHolder
if
(
VtableStubs
::
is_entry_point
(
entry
)
&&
VtableStubs
::
stub_containing
(
entry
)
->
is_itable_stub
())
{
if
(
cb
!=
NULL
&&
cb
->
is_vtable_blob
())
{
return
true
;
VtableStub
*
s
=
VtableStubs
::
entry_point
(
entry
);
return
(
s
!=
NULL
)
&&
s
->
is_itable_stub
();
}
}
return
false
;
return
false
;
}
}
...
...
src/share/vm/code/vtableStubs.cpp
浏览文件 @
77c96c30
/*
/*
* Copyright (c) 1997, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -60,7 +60,7 @@ void* VtableStub::operator new(size_t size, int code_size) throw() {
...
@@ -60,7 +60,7 @@ void* VtableStub::operator new(size_t size, int code_size) throw() {
// There is a dependency on the name of the blob in src/share/vm/prims/jvmtiCodeBlobEvents.cpp
// There is a dependency on the name of the blob in src/share/vm/prims/jvmtiCodeBlobEvents.cpp
// If changing the name, update the other file accordingly.
// If changing the name, update the other file accordingly.
BufferBlob
*
blob
=
Buffer
Blob
::
create
(
"vtable chunks"
,
bytes
);
VtableBlob
*
blob
=
Vtable
Blob
::
create
(
"vtable chunks"
,
bytes
);
if
(
blob
==
NULL
)
{
if
(
blob
==
NULL
)
{
return
NULL
;
return
NULL
;
}
}
...
@@ -167,17 +167,18 @@ void VtableStubs::enter(bool is_vtable_stub, int vtable_index, VtableStub* s) {
...
@@ -167,17 +167,18 @@ void VtableStubs::enter(bool is_vtable_stub, int vtable_index, VtableStub* s) {
_number_of_vtable_stubs
++
;
_number_of_vtable_stubs
++
;
}
}
VtableStub
*
VtableStubs
::
entry_point
(
address
pc
)
{
bool
VtableStubs
::
is_entry_point
(
address
pc
)
{
MutexLocker
ml
(
VtableStubs_lock
);
MutexLocker
ml
(
VtableStubs_lock
);
VtableStub
*
stub
=
(
VtableStub
*
)(
pc
-
VtableStub
::
entry_offset
());
VtableStub
*
stub
=
(
VtableStub
*
)(
pc
-
VtableStub
::
entry_offset
());
uint
hash
=
VtableStubs
::
hash
(
stub
->
is_vtable_stub
(),
stub
->
index
());
uint
hash
=
VtableStubs
::
hash
(
stub
->
is_vtable_stub
(),
stub
->
index
());
VtableStub
*
s
;
VtableStub
*
s
;
for
(
s
=
_table
[
hash
];
s
!=
NULL
&&
s
!=
stub
;
s
=
s
->
next
())
{}
for
(
s
=
_table
[
hash
];
s
!=
NULL
&&
s
!=
stub
;
s
=
s
->
next
())
{}
return
s
==
stub
;
if
(
s
==
stub
)
{
return
s
;
}
return
NULL
;
}
}
bool
VtableStubs
::
contains
(
address
pc
)
{
bool
VtableStubs
::
contains
(
address
pc
)
{
// simple solution for now - we may want to use
// simple solution for now - we may want to use
// a faster way if this function is called often
// a faster way if this function is called often
...
...
src/share/vm/code/vtableStubs.hpp
浏览文件 @
77c96c30
/*
/*
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -126,7 +126,7 @@ class VtableStubs : AllStatic {
...
@@ -126,7 +126,7 @@ class VtableStubs : AllStatic {
public:
public:
static
address
find_vtable_stub
(
int
vtable_index
)
{
return
find_stub
(
true
,
vtable_index
);
}
static
address
find_vtable_stub
(
int
vtable_index
)
{
return
find_stub
(
true
,
vtable_index
);
}
static
address
find_itable_stub
(
int
itable_index
)
{
return
find_stub
(
false
,
itable_index
);
}
static
address
find_itable_stub
(
int
itable_index
)
{
return
find_stub
(
false
,
itable_index
);
}
static
bool
is_entry_point
(
address
pc
);
// is pc a vtable stub entry point?
static
VtableStub
*
entry_point
(
address
pc
);
// vtable stub entry point for a pc
static
bool
contains
(
address
pc
);
// is pc within any stub?
static
bool
contains
(
address
pc
);
// is pc within any stub?
static
VtableStub
*
stub_containing
(
address
pc
);
// stub containing pc or NULL
static
VtableStub
*
stub_containing
(
address
pc
);
// stub containing pc or NULL
static
int
number_of_vtable_stubs
()
{
return
_number_of_vtable_stubs
;
}
static
int
number_of_vtable_stubs
()
{
return
_number_of_vtable_stubs
;
}
...
...
src/share/vm/oops/compiledICHolder.cpp
浏览文件 @
77c96c30
/*
/*
* Copyright (c) 1998, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -24,30 +24,12 @@
...
@@ -24,30 +24,12 @@
#include "precompiled.hpp"
#include "precompiled.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/klass.hpp"
#include "oops/method.hpp"
#include "oops/oop.inline2.hpp"
#include "oops/oop.inline2.hpp"
volatile
int
CompiledICHolder
::
_live_count
;
volatile
int
CompiledICHolder
::
_live_count
;
volatile
int
CompiledICHolder
::
_live_not_claimed_count
;
volatile
int
CompiledICHolder
::
_live_not_claimed_count
;
bool
CompiledICHolder
::
is_loader_alive
(
BoolObjectClosure
*
is_alive
)
{
if
(
_holder_metadata
->
is_method
())
{
if
(
!
((
Method
*
)
_holder_metadata
)
->
method_holder
()
->
is_loader_alive
(
is_alive
))
{
return
false
;
}
}
else
if
(
_holder_metadata
->
is_klass
())
{
if
(
!
((
Klass
*
)
_holder_metadata
)
->
is_loader_alive
(
is_alive
))
{
return
false
;
}
}
if
(
!
_holder_klass
->
is_loader_alive
(
is_alive
))
{
return
false
;
}
return
true
;
}
// Printing
// Printing
void
CompiledICHolder
::
print_on
(
outputStream
*
st
)
const
{
void
CompiledICHolder
::
print_on
(
outputStream
*
st
)
const
{
...
...
src/share/vm/oops/compiledICHolder.hpp
浏览文件 @
77c96c30
/*
/*
* Copyright (c) 1998, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
#define SHARE_VM_OOPS_COMPILEDICHOLDEROOP_HPP
#define SHARE_VM_OOPS_COMPILEDICHOLDEROOP_HPP
#include "oops/oop.hpp"
#include "oops/oop.hpp"
#include "oops/klass.hpp"
#include "oops/method.hpp"
// A CompiledICHolder* is a helper object for the inline cache implementation.
// A CompiledICHolder* is a helper object for the inline cache implementation.
// It holds:
// It holds:
...
@@ -48,11 +50,12 @@ class CompiledICHolder : public CHeapObj<mtCompiler> {
...
@@ -48,11 +50,12 @@ class CompiledICHolder : public CHeapObj<mtCompiler> {
Metadata
*
_holder_metadata
;
Metadata
*
_holder_metadata
;
Klass
*
_holder_klass
;
// to avoid name conflict with oopDesc::_klass
Klass
*
_holder_klass
;
// to avoid name conflict with oopDesc::_klass
CompiledICHolder
*
_next
;
CompiledICHolder
*
_next
;
bool
_is_metadata_method
;
public:
public:
// Constructor
// Constructor
CompiledICHolder
(
Metadata
*
metadata
,
Klass
*
klass
)
CompiledICHolder
(
Metadata
*
metadata
,
Klass
*
klass
,
bool
is_method
=
true
)
:
_holder_metadata
(
metadata
),
_holder_klass
(
klass
)
{
:
_holder_metadata
(
metadata
),
_holder_klass
(
klass
)
,
_is_metadata_method
(
is_method
)
{
#ifdef ASSERT
#ifdef ASSERT
Atomic
::
inc
(
&
_live_count
);
Atomic
::
inc
(
&
_live_count
);
Atomic
::
inc
(
&
_live_not_claimed_count
);
Atomic
::
inc
(
&
_live_not_claimed_count
);
...
@@ -82,7 +85,16 @@ class CompiledICHolder : public CHeapObj<mtCompiler> {
...
@@ -82,7 +85,16 @@ class CompiledICHolder : public CHeapObj<mtCompiler> {
CompiledICHolder
*
next
()
{
return
_next
;
}
CompiledICHolder
*
next
()
{
return
_next
;
}
void
set_next
(
CompiledICHolder
*
n
)
{
_next
=
n
;
}
void
set_next
(
CompiledICHolder
*
n
)
{
_next
=
n
;
}
bool
is_loader_alive
(
BoolObjectClosure
*
is_alive
);
inline
bool
is_loader_alive
(
BoolObjectClosure
*
is_alive
)
{
Klass
*
k
=
_is_metadata_method
?
((
Method
*
)
_holder_metadata
)
->
method_holder
()
:
(
Klass
*
)
_holder_metadata
;
if
(
!
k
->
is_loader_alive
(
is_alive
))
{
return
false
;
}
if
(
!
_holder_klass
->
is_loader_alive
(
is_alive
))
{
return
false
;
}
return
true
;
}
// Verify
// Verify
void
verify_on
(
outputStream
*
st
);
void
verify_on
(
outputStream
*
st
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录