Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
03902729
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看板
提交
03902729
编写于
2月 22, 2012
作者:
F
fparain
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
34968be4
027bd433
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
86 addition
and
25 deletion
+86
-25
agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java
.../src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java
+6
-1
src/cpu/x86/vm/vm_version_x86.cpp
src/cpu/x86/vm/vm_version_x86.cpp
+5
-5
src/os/bsd/vm/osThread_bsd.cpp
src/os/bsd/vm/osThread_bsd.cpp
+5
-1
src/os/bsd/vm/osThread_bsd.hpp
src/os/bsd/vm/osThread_bsd.hpp
+22
-3
src/os/bsd/vm/os_bsd.cpp
src/os/bsd/vm/os_bsd.cpp
+37
-3
src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp
src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp
+9
-3
src/share/vm/utilities/globalDefinitions_gcc.hpp
src/share/vm/utilities/globalDefinitions_gcc.hpp
+2
-9
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java
浏览文件 @
03902729
...
...
@@ -648,7 +648,12 @@ public class ConstantPool extends Oop implements ClassConstants {
}
public
void
printValueOn
(
PrintStream
tty
)
{
tty
.
print
(
"ConstantPool for "
+
getPoolHolder
().
getName
().
asString
());
Oop
holder
=
poolHolder
.
getValue
(
this
);
if
(
holder
instanceof
Klass
)
{
tty
.
print
(
"ConstantPool for "
+
((
Klass
)
holder
).
getName
().
asString
());
}
else
{
tty
.
print
(
"ConstantPool for partially loaded class"
);
}
}
public
long
getObjectSize
()
{
...
...
src/cpu/x86/vm/vm_version_x86.cpp
浏览文件 @
03902729
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -65,8 +65,8 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
address
generate_getPsrInfo
()
{
// Flags to test CPU type.
const
uint32_t
EFL_AC
=
0x40000
;
const
uint32_t
EFL_ID
=
0x200000
;
const
uint32_t
HS_
EFL_AC
=
0x40000
;
const
uint32_t
HS_
EFL_ID
=
0x200000
;
// Values for when we don't have a CPUID instruction.
const
int
CPU_FAMILY_SHIFT
=
8
;
const
uint32_t
CPU_FAMILY_386
=
(
3
<<
CPU_FAMILY_SHIFT
);
...
...
@@ -100,7 +100,7 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
//
// if we are unable to change the AC flag, we have a 386
//
__
xorl
(
rax
,
EFL_AC
);
__
xorl
(
rax
,
HS_
EFL_AC
);
__
push
(
rax
);
__
popf
();
__
pushf
();
...
...
@@ -118,7 +118,7 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
//
__
bind
(
detect_486
);
__
mov
(
rax
,
rcx
);
__
xorl
(
rax
,
EFL_ID
);
__
xorl
(
rax
,
HS_
EFL_ID
);
__
push
(
rax
);
__
popf
();
__
pushf
();
...
...
src/os/bsd/vm/osThread_bsd.cpp
浏览文件 @
03902729
/*
* Copyright (c) 1999, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -49,7 +49,11 @@
void
OSThread
::
pd_initialize
()
{
assert
(
this
!=
NULL
,
"check"
);
#ifdef __APPLE__
_thread_id
=
0
;
#else
_thread_id
=
NULL
;
#endif
_pthread_id
=
NULL
;
_siginfo
=
NULL
;
_ucontext
=
NULL
;
...
...
src/os/bsd/vm/osThread_bsd.hpp
浏览文件 @
03902729
/*
* Copyright (c) 1999, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -40,10 +40,17 @@
private
:
#ifdef _ALLBSD_SOURCE
// _thread_id and _pthread_id are the same on BSD
// keep both to minimize code divergence in os_bsd.cpp
#ifdef __APPLE__
thread_t
_thread_id
;
#else
pthread_t
_thread_id
;
#endif
// _pthread_id is the pthread id, which is used by library calls
// (e.g. pthread_kill).
pthread_t
_pthread_id
;
#else
// _thread_id is kernel thread id (similar to LWP id on Solaris). Each
// thread has a unique thread_id (BsdThreads or NPTL). It can be used
...
...
@@ -64,9 +71,15 @@
void
set_caller_sigmask
(
sigset_t
sigmask
)
{
_caller_sigmask
=
sigmask
;
}
#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
thread_t
thread_id
()
const
{
return
_thread_id
;
}
#else
pthread_t
thread_id
()
const
{
return
_thread_id
;
}
#endif
#else
pid_t
thread_id
()
const
{
return
_thread_id
;
...
...
@@ -84,9 +97,15 @@
}
#endif // ASSERT
#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
void
set_thread_id
(
thread_t
id
)
{
_thread_id
=
id
;
}
#else
void
set_thread_id
(
pthread_t
id
)
{
_thread_id
=
id
;
}
#endif
#else
void
set_thread_id
(
pid_t
id
)
{
_thread_id
=
id
;
...
...
src/os/bsd/vm/os_bsd.cpp
浏览文件 @
03902729
...
...
@@ -568,6 +568,25 @@ void os::init_system_properties_values() {
sprintf
(
ld_library_path
,
"%s:%s"
,
v
,
t
);
free
(
t
);
}
#ifdef __APPLE__
// Apple's Java6 has "." at the beginning of java.library.path.
// OpenJDK on Windows has "." at the end of java.library.path.
// OpenJDK on Linux and Solaris don't have "." in java.library.path
// at all. To ease the transition from Apple's Java6 to OpenJDK7,
// "." is appended to the end of java.library.path. Yes, this
// could cause a change in behavior, but Apple's Java6 behavior
// can be achieved by putting "." at the beginning of the
// JAVA_LIBRARY_PATH environment variable.
{
char
*
t
=
ld_library_path
;
// that's +3 for appending ":." and the trailing '\0'
ld_library_path
=
(
char
*
)
malloc
(
strlen
(
t
)
+
3
);
sprintf
(
ld_library_path
,
"%s:%s"
,
t
,
"."
);
free
(
t
);
}
#endif
Arguments
::
set_library_path
(
ld_library_path
);
}
...
...
@@ -979,8 +998,13 @@ static void *java_start(Thread *thread) {
}
#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
// thread_id is mach thread on macos
osthread
->
set_thread_id
(
::
mach_thread_self
());
#else
// thread_id is pthread_id on BSD
osthread
->
set_thread_id
(
::
pthread_self
());
#endif
#else
// thread_id is kernel thread id (similar to Solaris LWP id)
osthread
->
set_thread_id
(
os
::
Bsd
::
gettid
());
...
...
@@ -1171,7 +1195,11 @@ bool os::create_attached_thread(JavaThread* thread) {
// Store pthread info into the OSThread
#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
osthread
->
set_thread_id
(
::
mach_thread_self
());
#else
osthread
->
set_thread_id
(
::
pthread_self
());
#endif
#else
osthread
->
set_thread_id
(
os
::
Bsd
::
gettid
());
#endif
...
...
@@ -1788,7 +1816,13 @@ size_t os::lasterror(char *buf, size_t len) {
return
n
;
}
intx
os
::
current_thread_id
()
{
return
(
intx
)
pthread_self
();
}
intx
os
::
current_thread_id
()
{
#ifdef __APPLE__
return
(
intx
)
::
mach_thread_self
();
#else
return
(
intx
)
::
pthread_self
();
#endif
}
int
os
::
current_process_id
()
{
// Under the old bsd thread library, bsd gives each thread
...
...
@@ -5133,9 +5167,9 @@ jlong os::thread_cpu_time(Thread *thread, bool user_sys_cpu_time) {
struct
thread_basic_info
tinfo
;
mach_msg_type_number_t
tcount
=
THREAD_INFO_MAX
;
kern_return_t
kr
;
mach_port
_t
mach_thread
;
thread
_t
mach_thread
;
mach_thread
=
pthread_mach_thread_np
(
thread
->
osthread
()
->
thread_id
()
);
mach_thread
=
thread
->
osthread
()
->
thread_id
(
);
kr
=
thread_info
(
mach_thread
,
THREAD_BASIC_INFO
,
(
thread_info_t
)
&
tinfo
,
&
tcount
);
if
(
kr
!=
KERN_SUCCESS
)
return
-
1
;
...
...
src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp
浏览文件 @
03902729
/*
* Copyright (c) 2000, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -29,12 +29,18 @@
// constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp.
#ifdef __APPLE__
#define OS_THREAD_ID_TYPE thread_t
#else
#define OS_THREAD_ID_TYPE pthread_t
#endif
#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \
\
/******************************/
\
/* Threads (NOTE: incomplete) */
\
/******************************/
\
nonstatic_field(OSThread, _thread_id,
pthread_t)
\
nonstatic_field(OSThread, _thread_id,
OS_THREAD_ID_TYPE)
\
nonstatic_field(OSThread, _pthread_id, pthread_t) \
/* This must be the last entry, and must be present */
\
last_entry()
...
...
@@ -46,7 +52,7 @@
/* Posix Thread IDs */
\
/**********************/
\
\
declare_
integer_type(pid_t)
\
declare_
unsigned_integer_type(thread_t)
\
declare_unsigned_integer_type(pthread_t) \
\
/* This must be the last entry, and must be present */
\
...
...
src/share/vm/utilities/globalDefinitions_gcc.hpp
浏览文件 @
03902729
/*
* Copyright (c) 1998, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -87,14 +87,7 @@
#endif
#ifdef __APPLE__
#include <AvailabilityMacros.h>
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
// Mac OS X 10.4 defines EFL_AC and EFL_ID,
// which conflict with hotspot variable names.
//
// This has been fixed in Mac OS X 10.5.
#undef EFL_AC
#undef EFL_ID
#endif
#include <mach/mach.h>
#endif
#include <sys/time.h>
#endif // LINUX || _ALLBSD_SOURCE
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录