Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
31bf3df1
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看板
提交
31bf3df1
编写于
8月 17, 2011
作者:
C
collins
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
d5bd8611
f2f157f0
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
585 addition
and
210 deletion
+585
-210
make/windows/makefiles/compile.make
make/windows/makefiles/compile.make
+5
-1
src/os/windows/vm/decoder_windows.cpp
src/os/windows/vm/decoder_windows.cpp
+2
-1
src/os/windows/vm/jvm_windows.h
src/os/windows/vm/jvm_windows.h
+25
-2
src/os/windows/vm/os_windows.cpp
src/os/windows/vm/os_windows.cpp
+452
-203
src/os/windows/vm/os_windows.hpp
src/os/windows/vm/os_windows.hpp
+99
-1
src/share/vm/runtime/os.cpp
src/share/vm/runtime/os.cpp
+2
-2
未找到文件。
make/windows/makefiles/compile.make
浏览文件 @
31bf3df1
...
...
@@ -81,7 +81,6 @@ CPP=ARCH_ERROR
!
endif
CPP_FLAGS
=
$(CPP_FLAGS)
/D
"WIN32"
/D
"_WINDOWS"
# Must specify this for sharedRuntimeTrig.cpp
CPP_FLAGS
=
$(CPP_FLAGS)
/D
"VM_LITTLE_ENDIAN"
...
...
@@ -232,6 +231,11 @@ LINK_FLAGS= $(LINK_FLAGS) kernel32.lib user32.lib gdi32.lib winspool.lib \
uuid.lib Wsock32.lib winmm.lib /nologo /machine:
$(MACHINE)
/opt:REF
\
/opt:ICF,8 /map /debug
!if
$(MSC_VER)
>=
1600
LINK_FLAGS
=
$(LINK_FLAGS)
psapi.lib
!
endif
# Resource compiler settings
RC
=
rc.exe
RC_FLAGS
=
/D
"HS_VER=
$(HS_VER)
"
\
...
...
src/os/windows/vm/decoder_windows.cpp
浏览文件 @
31bf3df1
...
...
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "prims/jvm.h"
#include "runtime/os.hpp"
#include "utilities/decoder.hpp"
HMODULE
Decoder
::
_dbghelp_handle
=
NULL
;
...
...
@@ -35,7 +36,7 @@ void Decoder::initialize() {
if
(
!
_initialized
)
{
_initialized
=
true
;
H
MODULE
handle
=
::
LoadLibrary
(
"dbghelp.dll"
);
H
INSTANCE
handle
=
os
::
win32
::
load_Windows_dll
(
"dbghelp.dll"
,
NULL
,
0
);
if
(
!
handle
)
{
_decoder_status
=
helper_not_found
;
return
;
...
...
src/os/windows/vm/jvm_windows.h
浏览文件 @
31bf3df1
...
...
@@ -30,10 +30,33 @@
* JNI conversion, which should be sorted out later.
*/
// JDK7 requires VS2010
#if _MSC_VER >= 1600
// JDK7 minimum platform requirement: Windows XP
#if _WIN32_WINNT < 0x0501
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#endif
#include <windows.h>
// #include <windef.h>
// #include <winbase.h>
#if _MSC_VER <= 1200
// Psapi.h doesn't come with Visual Studio 6; it can be downloaded as Platform
// SDK from Microsoft. Here are the definitions copied from Psapi.h
typedef
struct
_MODULEINFO
{
LPVOID
lpBaseOfDll
;
DWORD
SizeOfImage
;
LPVOID
EntryPoint
;
}
MODULEINFO
,
*
LPMODULEINFO
;
#else
#include <Psapi.h>
#endif
#include <Tlhelp32.h>
// #include "jni.h"
...
...
src/os/windows/vm/os_windows.cpp
浏览文件 @
31bf3df1
此差异已折叠。
点击以展开。
src/os/windows/vm/os_windows.hpp
浏览文件 @
31bf3df1
...
...
@@ -24,7 +24,6 @@
#ifndef OS_WINDOWS_VM_OS_WINDOWS_HPP
#define OS_WINDOWS_VM_OS_WINDOWS_HPP
// Win32_OS defines the interface to windows operating systems
class
win32
{
...
...
@@ -55,6 +54,9 @@ class win32 {
static
julong
available_memory
();
static
julong
physical_memory
()
{
return
_physical_memory
;
}
// load dll from Windows system directory or Windows directory
static
HINSTANCE
load_Windows_dll
(
const
char
*
name
,
char
*
ebuf
,
int
ebuflen
);
public:
// Generic interface:
...
...
@@ -132,4 +134,100 @@ class PlatformParker : public CHeapObj {
}
;
// JDK7 requires VS2010
#if _MSC_VER < 1600
#define JDK6_OR_EARLIER 1
#endif
class
WinSock2Dll
:
AllStatic
{
public:
static
BOOL
WSAStartup
(
WORD
,
LPWSADATA
);
static
struct
hostent
*
gethostbyname
(
const
char
*
name
);
static
BOOL
WinSock2Available
();
#ifdef JDK6_OR_EARLIER
private:
static
int
(
PASCAL
FAR
*
_WSAStartup
)(
WORD
,
LPWSADATA
);
static
struct
hostent
*
(
PASCAL
FAR
*
_gethostbyname
)(...);
static
BOOL
initialized
;
static
void
initialize
();
#endif
};
class
Kernel32Dll
:
AllStatic
{
public:
static
BOOL
SwitchToThread
();
static
SIZE_T
GetLargePageMinimum
();
static
BOOL
SwitchToThreadAvailable
();
static
BOOL
GetLargePageMinimumAvailable
();
// Help tools
static
BOOL
HelpToolsAvailable
();
static
HANDLE
CreateToolhelp32Snapshot
(
DWORD
,
DWORD
);
static
BOOL
Module32First
(
HANDLE
,
LPMODULEENTRY32
);
static
BOOL
Module32Next
(
HANDLE
,
LPMODULEENTRY32
);
static
BOOL
GetNativeSystemInfoAvailable
();
static
void
GetNativeSystemInfo
(
LPSYSTEM_INFO
);
private:
// GetLargePageMinimum available on Windows Vista/Windows Server 2003
// and later
static
SIZE_T
(
WINAPI
*
_GetLargePageMinimum
)(
void
);
static
BOOL
initialized
;
static
void
initialize
();
#ifdef JDK6_OR_EARLIER
private:
static
BOOL
(
WINAPI
*
_SwitchToThread
)(
void
);
static
HANDLE
(
WINAPI
*
_CreateToolhelp32Snapshot
)(
DWORD
,
DWORD
);
static
BOOL
(
WINAPI
*
_Module32First
)(
HANDLE
,
LPMODULEENTRY32
);
static
BOOL
(
WINAPI
*
_Module32Next
)(
HANDLE
,
LPMODULEENTRY32
);
static
void
(
WINAPI
*
_GetNativeSystemInfo
)(
LPSYSTEM_INFO
);
#endif
};
class
Advapi32Dll
:
AllStatic
{
public:
static
BOOL
AdjustTokenPrivileges
(
HANDLE
,
BOOL
,
PTOKEN_PRIVILEGES
,
DWORD
,
PTOKEN_PRIVILEGES
,
PDWORD
);
static
BOOL
OpenProcessToken
(
HANDLE
,
DWORD
,
PHANDLE
);
static
BOOL
LookupPrivilegeValue
(
LPCTSTR
,
LPCTSTR
,
PLUID
);
static
BOOL
AdvapiAvailable
();
#ifdef JDK6_OR_EARLIER
private:
static
BOOL
(
WINAPI
*
_AdjustTokenPrivileges
)(
HANDLE
,
BOOL
,
PTOKEN_PRIVILEGES
,
DWORD
,
PTOKEN_PRIVILEGES
,
PDWORD
);
static
BOOL
(
WINAPI
*
_OpenProcessToken
)(
HANDLE
,
DWORD
,
PHANDLE
);
static
BOOL
(
WINAPI
*
_LookupPrivilegeValue
)(
LPCTSTR
,
LPCTSTR
,
PLUID
);
static
BOOL
initialized
;
static
void
initialize
();
#endif
};
class
PSApiDll
:
AllStatic
{
public:
static
BOOL
EnumProcessModules
(
HANDLE
,
HMODULE
*
,
DWORD
,
LPDWORD
);
static
DWORD
GetModuleFileNameEx
(
HANDLE
,
HMODULE
,
LPTSTR
,
DWORD
);
static
BOOL
GetModuleInformation
(
HANDLE
,
HMODULE
,
LPMODULEINFO
,
DWORD
);
static
BOOL
PSApiAvailable
();
#ifdef JDK6_OR_EARLIER
private:
static
BOOL
(
WINAPI
*
_EnumProcessModules
)(
HANDLE
,
HMODULE
*
,
DWORD
,
LPDWORD
);
static
BOOL
(
WINAPI
*
_GetModuleFileNameEx
)(
HANDLE
,
HMODULE
,
LPTSTR
,
DWORD
);;
static
BOOL
(
WINAPI
*
_GetModuleInformation
)(
HANDLE
,
HMODULE
,
LPMODULEINFO
,
DWORD
);
static
BOOL
initialized
;
static
void
initialize
();
#endif
};
#endif // OS_WINDOWS_VM_OS_WINDOWS_HPP
src/share/vm/runtime/os.cpp
浏览文件 @
31bf3df1
...
...
@@ -1299,7 +1299,7 @@ int os::get_line_chars(int fd, char* buf, const size_t bsize){
size_t
sz
,
i
=
0
;
// read until EOF, EOL or buf is full
while
((
sz
=
(
int
)
read
(
fd
,
&
buf
[
i
],
1
))
==
1
&&
i
<
(
bsize
-
1
)
&&
buf
[
i
]
!=
'\n'
)
{
while
((
sz
=
(
int
)
read
(
fd
,
&
buf
[
i
],
1
))
==
1
&&
i
<
(
bsize
-
2
)
&&
buf
[
i
]
!=
'\n'
)
{
++
i
;
}
...
...
@@ -1320,7 +1320,7 @@ int os::get_line_chars(int fd, char* buf, const size_t bsize){
}
// line is longer than size of buf, skip to EOL
int
ch
;
char
ch
;
while
(
read
(
fd
,
&
ch
,
1
)
==
1
&&
ch
!=
'\n'
)
{
// Do nothing
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录