Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
76629404
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
76629404
编写于
3月 04, 2014
作者:
N
neugens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8036619: Shark: add LLVM 3.4 support
Reviewed-by: twisti
上级
03a18093
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
98 addition
and
35 deletion
+98
-35
hotspot/make/linux/makefiles/zeroshark.make
hotspot/make/linux/makefiles/zeroshark.make
+3
-0
hotspot/src/share/vm/shark/llvmHeaders.hpp
hotspot/src/share/vm/shark/llvmHeaders.hpp
+27
-5
hotspot/src/share/vm/shark/sharkCompiler.cpp
hotspot/src/share/vm/shark/sharkCompiler.cpp
+4
-0
hotspot/src/share/vm/shark/sharkCompiler.hpp
hotspot/src/share/vm/shark/sharkCompiler.hpp
+3
-0
hotspot/src/share/vm/shark/sharkInliner.cpp
hotspot/src/share/vm/shark/sharkInliner.cpp
+4
-0
hotspot/src/share/vm/shark/sharkMemoryManager.cpp
hotspot/src/share/vm/shark/sharkMemoryManager.cpp
+39
-21
hotspot/src/share/vm/shark/sharkMemoryManager.hpp
hotspot/src/share/vm/shark/sharkMemoryManager.hpp
+18
-9
未找到文件。
hotspot/make/linux/makefiles/zeroshark.make
浏览文件 @
76629404
...
...
@@ -25,6 +25,9 @@
# Setup common to Zero (non-Shark) and Shark versions of VM
# override this from the main file because some version of llvm do not like -Wundef
WARNING_FLAGS
=
-Wpointer-arith
-Wsign-compare
-Wunused-function
-Wunused-value
# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
OPT_CFLAGS/
sharedRuntimeTrig.o
=
$
(
OPT_CFLAGS/NOOPT
)
# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
...
...
hotspot/src/share/vm/shark/llvmHeaders.hpp
浏览文件 @
76629404
...
...
@@ -36,21 +36,43 @@
#endif
#include <llvm/Analysis/Verifier.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
// includes specific to each version
#if SHARK_LLVM_VERSION <= 31
#include <llvm/Support/IRBuilder.h>
#include <llvm/Type.h>
#include <llvm/Argument.h>
#include <llvm/Constants.h>
#include <llvm/DerivedTypes.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/Instructions.h>
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
#if SHARK_LLVM_VERSION <= 31
#include <llvm/Support/IRBuilder.h>
#else
#elif SHARK_LLVM_VERSION <= 32
#include <llvm/IRBuilder.h>
#include <llvm/Type.h>
#include <llvm/Argument.h>
#include <llvm/Constants.h>
#include <llvm/DerivedTypes.h>
#include <llvm/Instructions.h>
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
#else // SHARK_LLVM_VERSION <= 34
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/Argument.h>
#include <llvm/IR/Constants.h>
#include <llvm/IR/DerivedTypes.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/IR/Instructions.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/ADT/StringRef.h>
#include <llvm/IR/Type.h>
#endif
// common includes
#include <llvm/Support/Threading.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Type.h>
#include <llvm/ExecutionEngine/JITMemoryManager.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/ExecutionEngine/MCJIT.h>
...
...
hotspot/src/share/vm/shark/sharkCompiler.cpp
浏览文件 @
76629404
...
...
@@ -364,3 +364,7 @@ const char* SharkCompiler::methodname(const char* klass, const char* method) {
*
(
dst
++
)
=
'\0'
;
return
buf
;
}
void
SharkCompiler
::
print_timers
()
{
// do nothing
}
hotspot/src/share/vm/shark/sharkCompiler.hpp
浏览文件 @
76629404
...
...
@@ -56,6 +56,9 @@ class SharkCompiler : public AbstractCompiler {
// Compile a normal (bytecode) method and install it in the VM
void
compile_method
(
ciEnv
*
env
,
ciMethod
*
target
,
int
entry_bci
);
// Print compilation timers and statistics
void
print_timers
();
// Generate a wrapper for a native (JNI) method
nmethod
*
generate_native_wrapper
(
MacroAssembler
*
masm
,
methodHandle
target
,
...
...
hotspot/src/share/vm/shark/sharkInliner.cpp
浏览文件 @
76629404
...
...
@@ -744,6 +744,10 @@ bool SharkInlinerHelper::do_field_access(bool is_get, bool is_field) {
}
bool
SharkInliner
::
attempt_inline
(
ciMethod
*
target
,
SharkState
*
state
)
{
if
(
!
Inline
)
{
return
false
;
}
if
(
SharkIntrinsics
::
is_intrinsic
(
target
))
{
SharkIntrinsics
::
inline_intrinsic
(
target
,
state
);
return
true
;
...
...
hotspot/src/share/vm/shark/sharkMemoryManager.cpp
浏览文件 @
76629404
...
...
@@ -59,18 +59,6 @@ void SharkMemoryManager::endFunctionBody(const Function* F,
entry
->
set_code_limit
(
FunctionEnd
);
}
unsigned
char
*
SharkMemoryManager
::
startExceptionTable
(
const
Function
*
F
,
uintptr_t
&
ActualSize
)
{
return
mm
()
->
startExceptionTable
(
F
,
ActualSize
);
}
void
SharkMemoryManager
::
endExceptionTable
(
const
Function
*
F
,
unsigned
char
*
TableStart
,
unsigned
char
*
TableEnd
,
unsigned
char
*
FrameRegister
)
{
mm
()
->
endExceptionTable
(
F
,
TableStart
,
TableEnd
,
FrameRegister
);
}
void
SharkMemoryManager
::
setMemoryWritable
()
{
mm
()
->
setMemoryWritable
();
}
...
...
@@ -79,10 +67,6 @@ void SharkMemoryManager::setMemoryExecutable() {
mm
()
->
setMemoryExecutable
();
}
void
SharkMemoryManager
::
deallocateExceptionTable
(
void
*
ptr
)
{
mm
()
->
deallocateExceptionTable
(
ptr
);
}
void
SharkMemoryManager
::
deallocateFunctionBody
(
void
*
ptr
)
{
mm
()
->
deallocateFunctionBody
(
ptr
);
}
...
...
@@ -96,6 +80,17 @@ void* SharkMemoryManager::getPointerToNamedFunction(const std::string &Name, boo
return
mm
()
->
getPointerToNamedFunction
(
Name
,
AbortOnFailure
);
}
void
SharkMemoryManager
::
setPoisonMemory
(
bool
poison
)
{
mm
()
->
setPoisonMemory
(
poison
);
}
unsigned
char
*
SharkMemoryManager
::
allocateSpace
(
intptr_t
Size
,
unsigned
int
Alignment
)
{
return
mm
()
->
allocateSpace
(
Size
,
Alignment
);
}
#if SHARK_LLVM_VERSION <= 32
uint8_t
*
SharkMemoryManager
::
allocateCodeSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
)
{
return
mm
()
->
allocateCodeSection
(
Size
,
Alignment
,
SectionID
);
}
...
...
@@ -104,11 +99,34 @@ uint8_t* SharkMemoryManager::allocateDataSection(uintptr_t Size, unsigned Alignm
return
mm
()
->
allocateDataSection
(
Size
,
Alignment
,
SectionID
);
}
void
SharkMemoryManager
::
setPoisonMemory
(
bool
poison
)
{
mm
()
->
setPoisonMemory
(
poison
);
void
SharkMemoryManager
::
deallocateExceptionTable
(
void
*
ptr
)
{
mm
()
->
deallocateExceptionTable
(
ptr
);
}
unsigned
char
*
SharkMemoryManager
::
allocateSpace
(
intptr_t
Size
,
unsigned
int
Alignment
)
{
return
mm
()
->
allocateSpace
(
Size
,
Alignment
);
unsigned
char
*
SharkMemoryManager
::
startExceptionTable
(
const
Function
*
F
,
uintptr_t
&
ActualSize
)
{
return
mm
()
->
startExceptionTable
(
F
,
ActualSize
);
}
void
SharkMemoryManager
::
endExceptionTable
(
const
Function
*
F
,
unsigned
char
*
TableStart
,
unsigned
char
*
TableEnd
,
unsigned
char
*
FrameRegister
)
{
mm
()
->
endExceptionTable
(
F
,
TableStart
,
TableEnd
,
FrameRegister
);
}
#else
uint8_t
*
SharkMemoryManager
::
allocateCodeSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
,
StringRef
SectionName
)
{
return
mm
()
->
allocateCodeSection
(
Size
,
Alignment
,
SectionID
,
SectionName
);
}
uint8_t
*
SharkMemoryManager
::
allocateDataSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
,
StringRef
SectionName
,
bool
IsReadOnly
)
{
return
mm
()
->
allocateDataSection
(
Size
,
Alignment
,
SectionID
,
SectionName
,
IsReadOnly
);
}
bool
SharkMemoryManager
::
finalizeMemory
(
std
::
string
*
ErrMsg
)
{
return
mm
()
->
finalizeMemory
(
ErrMsg
);
}
#endif
hotspot/src/share/vm/shark/sharkMemoryManager.hpp
浏览文件 @
76629404
...
...
@@ -69,23 +69,32 @@ class SharkMemoryManager : public llvm::JITMemoryManager {
void
endFunctionBody
(
const
llvm
::
Function
*
F
,
unsigned
char
*
FunctionStart
,
unsigned
char
*
FunctionEnd
);
unsigned
char
*
startExceptionTable
(
const
llvm
::
Function
*
F
,
uintptr_t
&
ActualSize
);
void
endExceptionTable
(
const
llvm
::
Function
*
F
,
unsigned
char
*
TableStart
,
unsigned
char
*
TableEnd
,
unsigned
char
*
FrameRegister
);
void
*
getPointerToNamedFunction
(
const
std
::
string
&
Name
,
bool
AbortOnFailure
=
true
);
uint8_t
*
allocateCodeSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
);
uint8_t
*
allocateDataSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
);
void
setPoisonMemory
(
bool
);
uint8_t
*
allocateGlobal
(
uintptr_t
,
unsigned
int
);
void
setMemoryWritable
();
void
setMemoryExecutable
();
void
deallocateExceptionTable
(
void
*
ptr
);
void
deallocateFunctionBody
(
void
*
ptr
);
unsigned
char
*
allocateSpace
(
intptr_t
Size
,
unsigned
int
Alignment
);
#if SHARK_LLVM_VERSION <= 32
uint8_t
*
allocateCodeSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
);
uint8_t
*
allocateDataSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
);
unsigned
char
*
startExceptionTable
(
const
llvm
::
Function
*
F
,
uintptr_t
&
ActualSize
);
void
deallocateExceptionTable
(
void
*
ptr
);
void
endExceptionTable
(
const
llvm
::
Function
*
F
,
unsigned
char
*
TableStart
,
unsigned
char
*
TableEnd
,
unsigned
char
*
FrameRegister
);
#else
uint8_t
*
allocateCodeSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
,
llvm
::
StringRef
SectionName
);
uint8_t
*
allocateDataSection
(
uintptr_t
Size
,
unsigned
Alignment
,
unsigned
SectionID
,
llvm
::
StringRef
SectionName
,
bool
IsReadOnly
);
bool
finalizeMemory
(
std
::
string
*
ErrMsg
=
0
);
#endif
};
#endif // SHARE_VM_SHARK_SHARKMEMORYMANAGER_HPP
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录