Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
32ce5291
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看板
提交
32ce5291
编写于
8月 31, 2012
作者:
J
jiangli
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
f50306ac
9998e626
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
204 addition
and
30 deletion
+204
-30
agent/make/saenv.sh
agent/make/saenv.sh
+1
-1
agent/make/start-debug-server-proc.sh
agent/make/start-debug-server-proc.sh
+4
-3
agent/src/os/linux/LinuxDebuggerLocal.c
agent/src/os/linux/LinuxDebuggerLocal.c
+5
-3
agent/src/os/linux/libproc.h
agent/src/os/linux/libproc.h
+10
-1
agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java
agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java
+8
-2
agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java
...c/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java
+9
-2
agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java
...share/classes/sun/jvm/hotspot/debugger/ThreadContext.java
+4
-0
agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java
...es/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java
+5
-0
agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java
...sses/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java
+5
-0
agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java
...lasses/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java
+4
-2
agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java
...jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java
+12
-3
agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
...sses/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
+16
-2
agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
...sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
+14
-2
agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java
...es/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java
+5
-0
agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java
...lasses/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java
+5
-0
agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
+11
-1
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
+7
-0
agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
...lasses/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
+6
-0
agent/src/share/classes/sun/jvm/hotspot/utilities/AltPlatformInfo.java
...re/classes/sun/jvm/hotspot/utilities/AltPlatformInfo.java
+31
-0
agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java
...share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java
+7
-0
make/defs.make
make/defs.make
+9
-0
make/linux/makefiles/defs.make
make/linux/makefiles/defs.make
+2
-0
make/linux/makefiles/sa.make
make/linux/makefiles/sa.make
+10
-4
make/linux/makefiles/saproc.make
make/linux/makefiles/saproc.make
+12
-3
make/pic.make
make/pic.make
+1
-1
src/share/vm/runtime/vmStructs.cpp
src/share/vm/runtime/vmStructs.cpp
+1
-0
未找到文件。
agent/make/saenv.sh
浏览文件 @
32ce5291
...
...
@@ -26,7 +26,7 @@
# This file sets common environment variables for all SA scripts
OS
=
`
uname
`
STARTDIR
=
`
dirname
$0
`
STARTDIR
=
`
(
cd
\`
dirname
$0
\`
;
pwd
)
`
ARCH
=
`
uname
-m
`
if
[
"x
$SA_JAVA
"
=
"x"
]
;
then
...
...
agent/make/start-debug-server-proc.sh
浏览文件 @
32ce5291
...
...
@@ -25,10 +25,11 @@
.
`
dirname
$0
`
/saenv.sh
if
[
-f
$STARTDIR
/
sa
.jar
]
;
then
CP
=
$STARTDIR
/
sa
.jar
if
[
-f
$STARTDIR
/
../lib/sa-jdi
.jar
]
;
then
CP
=
$STARTDIR
/
../lib/sa-jdi
.jar
else
CP
=
$STARTDIR
/../build/classes
fi
$SA_JAVA
-classpath
$CP
${
OPTIONS
}
-Djava
.rmi.server.codebase
=
file:/
$CP
-Djava
.security.policy
=
$STARTDIR
\/
grantAll.policy sun.jvm.hotspot.DebugServer
$*
$STARTDIR
/java
-classpath
$CP
${
OPTIONS
}
-Djava
.rmi.server.codebase
=
file://
$CP
-Djava
.security.policy
=
${
STARTDIR
}
/grantAll.policy sun.jvm.hotspot.DebugServer
$*
agent/src/os/linux/LinuxDebuggerLocal.c
浏览文件 @
32ce5291
/*
* Copyright (c) 2002, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
12
, 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
...
...
@@ -55,11 +55,11 @@ static jmethodID listAdd_ID = 0;
#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
static
void
throw_new_debugger_exception
(
JNIEnv
*
env
,
const
char
*
errMsg
)
{
void
throw_new_debugger_exception
(
JNIEnv
*
env
,
const
char
*
errMsg
)
{
(
*
env
)
->
ThrowNew
(
env
,
(
*
env
)
->
FindClass
(
env
,
"sun/jvm/hotspot/debugger/DebuggerException"
),
errMsg
);
}
st
atic
st
ruct
ps_prochandle
*
get_proc_handle
(
JNIEnv
*
env
,
jobject
this_obj
)
{
struct
ps_prochandle
*
get_proc_handle
(
JNIEnv
*
env
,
jobject
this_obj
)
{
jlong
ptr
=
(
*
env
)
->
GetLongField
(
env
,
this_obj
,
p_ps_prochandle_ID
);
return
(
struct
ps_prochandle
*
)(
intptr_t
)
ptr
;
}
...
...
@@ -280,6 +280,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
return
(
err
==
PS_OK
)
?
array
:
0
;
}
#if defined(i386) || defined(ia64) || defined(amd64) || defined(sparc) || defined(sparcv9)
JNIEXPORT
jlongArray
JNICALL
Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
(
JNIEnv
*
env
,
jobject
this_obj
,
jint
lwp_id
)
{
...
...
@@ -410,3 +411,4 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
(
*
env
)
->
ReleaseLongArrayElements
(
env
,
array
,
regs
,
JNI_COMMIT
);
return
array
;
}
#endif
agent/src/os/linux/libproc.h
浏览文件 @
32ce5291
/*
* Copyright (c) 2003, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
12
, 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
...
...
@@ -25,10 +25,15 @@
#ifndef _LIBPROC_H_
#define _LIBPROC_H_
#include <jni.h>
#include <unistd.h>
#include <stdint.h>
#include "proc_service.h"
#if defined(arm) || defined(ppc)
#include "libproc_md.h"
#endif
#if defined(sparc) || defined(sparcv9)
/*
If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
...
...
@@ -139,4 +144,8 @@ uintptr_t lookup_symbol(struct ps_prochandle* ph, const char* object_name,
// address->nearest symbol lookup. return NULL for no symbol
const
char
*
symbol_for_pc
(
struct
ps_prochandle
*
ph
,
uintptr_t
addr
,
uintptr_t
*
poffset
);
struct
ps_prochandle
*
get_proc_handle
(
JNIEnv
*
env
,
jobject
this_obj
);
void
throw_new_debugger_exception
(
JNIEnv
*
env
,
const
char
*
errMsg
);
#endif //__LIBPROC_H_
agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java
浏览文件 @
32ce5291
/*
* Copyright (c) 2000, 201
1
, 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
...
...
@@ -549,7 +549,13 @@ public class HotSpotAgent {
machDesc
=
new
MachineDescriptionSPARC32Bit
();
}
}
else
{
throw
new
DebuggerException
(
"Linux only supported on x86/ia64/amd64/sparc/sparc64"
);
try
{
machDesc
=
(
MachineDescription
)
Class
.
forName
(
"sun.jvm.hotspot.debugger.MachineDescription"
+
cpu
.
toUpperCase
()).
newInstance
();
}
catch
(
Exception
e
)
{
throw
new
DebuggerException
(
"Linux not supported on machine type "
+
cpu
);
}
}
LinuxDebuggerLocal
dbg
=
...
...
agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java
浏览文件 @
32ce5291
/*
* Copyright (c) 2002, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
...
...
@@ -737,9 +737,16 @@ public class BugSpotAgent {
machDesc
=
new
MachineDescriptionSPARC32Bit
();
}
}
else
{
throw
new
DebuggerException
(
"Linux only supported on x86/ia64/amd64/sparc/sparc64"
);
try
{
machDesc
=
(
MachineDescription
)
Class
.
forName
(
"sun.jvm.hotspot.debugger.MachineDescription"
+
cpu
.
toUpperCase
()).
newInstance
();
}
catch
(
Exception
e
)
{
throw
new
DebuggerException
(
"unsupported machine type"
);
}
}
// Note we do not use a cache for the local debugger in server
// mode; it will be taken care of on the client side (once remote
// debugging is implemented).
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java
浏览文件 @
32ce5291
...
...
@@ -24,6 +24,8 @@
package
sun.jvm.hotspot.debugger
;
import
sun.jvm.hotspot.debugger.cdbg.*
;
/** This is a placeholder interface for a thread's context, containing
only integer registers (no floating-point ones). What it contains
is platform-dependent. Not all registers are guaranteed to be
...
...
@@ -54,4 +56,6 @@ public interface ThreadContext {
/** Set the value of the specified register (0..getNumRegisters() -
1) as an Address */
public
void
setRegisterAsAddress
(
int
index
,
Address
value
);
public
CFrame
getTopFrame
(
Debugger
dbg
);
}
agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java
浏览文件 @
32ce5291
...
...
@@ -25,6 +25,7 @@
package
sun.jvm.hotspot.debugger.amd64
;
import
sun.jvm.hotspot.debugger.*
;
import
sun.jvm.hotspot.debugger.cdbg.*
;
/** Specifies the thread context on amd64 platforms; only a sub-portion
* of the context is guaranteed to be present on all operating
...
...
@@ -98,6 +99,10 @@ public abstract class AMD64ThreadContext implements ThreadContext {
return
data
[
index
];
}
public
CFrame
getTopFrame
(
Debugger
dbg
)
{
return
null
;
}
/** This can't be implemented in this class since we would have to
* tie the implementation to, for example, the debugging system */
public
abstract
void
setRegisterAsAddress
(
int
index
,
Address
value
);
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java
浏览文件 @
32ce5291
...
...
@@ -25,6 +25,7 @@
package
sun.jvm.hotspot.debugger.ia64
;
import
sun.jvm.hotspot.debugger.*
;
import
sun.jvm.hotspot.debugger.cdbg.*
;
/** Specifies the thread context on ia64 platform; only a sub-portion
of the context is guaranteed to be present on all operating
...
...
@@ -172,6 +173,10 @@ public abstract class IA64ThreadContext implements ThreadContext {
return
data
[
index
];
}
public
CFrame
getTopFrame
(
Debugger
dbg
)
{
return
null
;
}
/** This can't be implemented in this class since we would have to
tie the implementation to, for example, the debugging system */
public
abstract
void
setRegisterAsAddress
(
int
index
,
Address
value
);
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java
浏览文件 @
32ce5291
/*
* Copyright (c) 2003, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
12
, 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
...
...
@@ -107,7 +107,9 @@ class LinuxCDebugger implements CDebugger {
if
(
pc
==
null
)
return
null
;
return
new
LinuxSPARCCFrame
(
dbg
,
sp
,
pc
,
LinuxDebuggerLocal
.
getAddressSize
());
}
else
{
throw
new
DebuggerException
(
cpu
+
" is not yet supported"
);
// Runtime exception thrown by LinuxThreadContextFactory if unknown cpu
ThreadContext
context
=
(
ThreadContext
)
thread
.
getContext
();
return
context
.
getTopFrame
(
dbg
);
}
}
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxThreadContextFactory.java
浏览文件 @
32ce5291
/*
* Copyright (c) 2002, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
12
, 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
...
...
@@ -24,6 +24,7 @@
package
sun.jvm.hotspot.debugger.linux
;
import
java.lang.reflect.*
;
import
sun.jvm.hotspot.debugger.*
;
import
sun.jvm.hotspot.debugger.linux.amd64.*
;
import
sun.jvm.hotspot.debugger.linux.ia64.*
;
...
...
@@ -41,8 +42,16 @@ class LinuxThreadContextFactory {
return
new
LinuxIA64ThreadContext
(
dbg
);
}
else
if
(
cpu
.
equals
(
"sparc"
))
{
return
new
LinuxSPARCThreadContext
(
dbg
);
}
else
{
throw
new
RuntimeException
(
"cpu "
+
cpu
+
" is not yet supported"
);
}
else
{
try
{
Class
tcc
=
Class
.
forName
(
"sun.jvm.hotspot.debugger.linux."
+
cpu
.
toLowerCase
()
+
".Linux"
+
cpu
.
toUpperCase
()
+
"ThreadContext"
);
Constructor
[]
ctcc
=
tcc
.
getConstructors
();
return
(
ThreadContext
)
ctcc
[
0
].
newInstance
(
dbg
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"cpu "
+
cpu
+
" is not yet supported"
);
}
}
}
}
agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
浏览文件 @
32ce5291
/*
* Copyright (c) 2002, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
12
, 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
...
...
@@ -27,6 +27,7 @@ package sun.jvm.hotspot.debugger.proc;
import
java.io.*
;
import
java.net.*
;
import
java.util.*
;
import
java.lang.reflect.*
;
import
sun.jvm.hotspot.debugger.*
;
import
sun.jvm.hotspot.debugger.cdbg.*
;
import
sun.jvm.hotspot.debugger.proc.amd64.*
;
...
...
@@ -86,7 +87,16 @@ public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger {
pcRegIndex
=
AMD64ThreadContext
.
RIP
;
fpRegIndex
=
AMD64ThreadContext
.
RBP
;
}
else
{
try
{
Class
tfc
=
Class
.
forName
(
"sun.jvm.hotspot.debugger.proc."
+
cpu
.
toLowerCase
()
+
".Proc"
+
cpu
.
toUpperCase
()
+
"ThreadFactory"
);
Constructor
[]
ctfc
=
tfc
.
getConstructors
();
threadFactory
=
(
ProcThreadFactory
)
ctfc
[
0
].
newInstance
(
this
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"Thread access for CPU architecture "
+
PlatformInfo
.
getCPU
()
+
" not yet supported"
);
// Note: pcRegIndex and fpRegIndex do not appear to be referenced
}
}
if
(
useCache
)
{
// Cache portion of the remote process's address space.
...
...
@@ -375,7 +385,11 @@ public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger {
int
pagesize
=
getPageSize0
();
if
(
pagesize
==
-
1
)
{
// return the hard coded default value.
pagesize
=
(
PlatformInfo
.
getCPU
().
equals
(
"x86"
))?
4096
:
8192
;
if
(
PlatformInfo
.
getCPU
().
equals
(
"sparc"
)
||
PlatformInfo
.
getCPU
().
equals
(
"amd64"
)
)
pagesize
=
8196
;
else
pagesize
=
4096
;
}
return
pagesize
;
}
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
浏览文件 @
32ce5291
/*
* Copyright (c) 2002, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
12
, 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
...
...
@@ -26,6 +26,7 @@ package sun.jvm.hotspot.debugger.remote;
import
java.rmi.*
;
import
java.util.*
;
import
java.lang.reflect.*
;
import
sun.jvm.hotspot.debugger.*
;
import
sun.jvm.hotspot.debugger.cdbg.*
;
...
...
@@ -70,7 +71,18 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
cacheNumPages
=
parseCacheNumPagesProperty
(
cacheSize
/
cachePageSize
);
unalignedAccessesOkay
=
true
;
}
else
{
throw
new
DebuggerException
(
"Thread access for CPU architecture "
+
cpu
+
" not yet supported"
);
try
{
Class
tf
=
Class
.
forName
(
"sun.jvm.hotspot.debugger.remote."
+
cpu
.
toLowerCase
()
+
".Remote"
+
cpu
.
toUpperCase
()
+
"ThreadFactory"
);
Constructor
[]
ctf
=
tf
.
getConstructors
();
threadFactory
=
(
RemoteThreadFactory
)
ctf
[
0
].
newInstance
(
this
);
}
catch
(
Exception
e
)
{
throw
new
DebuggerException
(
"Thread access for CPU architecture "
+
cpu
+
" not yet supported"
);
}
cachePageSize
=
4096
;
cacheNumPages
=
parseCacheNumPagesProperty
(
cacheSize
/
cachePageSize
);
unalignedAccessesOkay
=
false
;
}
// Cache portion of the remote process's address space.
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java
浏览文件 @
32ce5291
...
...
@@ -25,6 +25,7 @@
package
sun.jvm.hotspot.debugger.sparc
;
import
sun.jvm.hotspot.debugger.*
;
import
sun.jvm.hotspot.debugger.cdbg.*
;
/** Currently provides just the minimal information necessary to get
stack traces working. FIXME: currently hardwired for v9 -- will
...
...
@@ -124,6 +125,10 @@ public abstract class SPARCThreadContext implements ThreadContext {
return
data
[
index
];
}
public
CFrame
getTopFrame
(
Debugger
dbg
)
{
return
null
;
}
/** This can't be implemented in this class since we would have to
tie the implementation to, for example, the debugging system */
public
abstract
void
setRegisterAsAddress
(
int
index
,
Address
value
);
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java
浏览文件 @
32ce5291
...
...
@@ -25,6 +25,7 @@
package
sun.jvm.hotspot.debugger.x86
;
import
sun.jvm.hotspot.debugger.*
;
import
sun.jvm.hotspot.debugger.cdbg.*
;
/** Specifies the thread context on x86 platforms; only a sub-portion
of the context is guaranteed to be present on all operating
...
...
@@ -109,6 +110,10 @@ public abstract class X86ThreadContext implements ThreadContext {
return
data
[
index
];
}
public
CFrame
getTopFrame
(
Debugger
dbg
)
{
return
null
;
}
/** This can't be implemented in this class since we would have to
tie the implementation to, for example, the debugging system */
public
abstract
void
setRegisterAsAddress
(
int
index
,
Address
value
);
...
...
agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
浏览文件 @
32ce5291
/*
* Copyright (c) 2000, 201
1
, 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
...
...
@@ -91,6 +91,16 @@ public class Threads {
access
=
new
LinuxAMD64JavaThreadPDAccess
();
}
else
if
(
cpu
.
equals
(
"sparc"
))
{
access
=
new
LinuxSPARCJavaThreadPDAccess
();
}
else
{
try
{
access
=
(
JavaThreadPDAccess
)
Class
.
forName
(
"sun.jvm.hotspot.runtime.linux_"
+
cpu
.
toLowerCase
()
+
".Linux"
+
cpu
.
toUpperCase
()
+
"JavaThreadPDAccess"
).
newInstance
();
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"OS/CPU combination "
+
os
+
"/"
+
cpu
+
" not yet supported"
);
}
}
}
else
if
(
os
.
equals
(
"bsd"
))
{
if
(
cpu
.
equals
(
"x86"
))
{
...
...
agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
浏览文件 @
32ce5291
...
...
@@ -92,6 +92,8 @@ public class VM {
private
boolean
usingServerCompiler
;
/** Flag indicating whether UseTLAB is turned on */
private
boolean
useTLAB
;
/** Flag indicating whether invokedynamic support is on */
private
boolean
enableInvokeDynamic
;
/** alignment constants */
private
boolean
isLP64
;
private
int
bytesPerLong
;
...
...
@@ -317,6 +319,7 @@ public class VM {
}
useTLAB
=
(
db
.
lookupIntConstant
(
"UseTLAB"
).
intValue
()
!=
0
);
enableInvokeDynamic
=
(
db
.
lookupIntConstant
(
"EnableInvokeDynamic"
).
intValue
()
!=
0
);
if
(
debugger
!=
null
)
{
isLP64
=
debugger
.
getMachineDescription
().
isLP64
();
...
...
@@ -552,6 +555,10 @@ public class VM {
return
useTLAB
;
}
public
boolean
getEnableInvokeDynamic
()
{
return
enableInvokeDynamic
;
}
public
TypeDataBase
getTypeDataBase
()
{
return
db
;
}
...
...
agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
浏览文件 @
32ce5291
...
...
@@ -204,7 +204,13 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
}
else
if
(
cpu
.
equals
(
"ia64"
))
{
cpuHelper
=
new
IA64Helper
();
}
else
{
try
{
cpuHelper
=
(
CPUHelper
)
Class
.
forName
(
"sun.jvm.hotspot.asm."
+
cpu
.
toLowerCase
()
+
"."
+
cpu
.
toUpperCase
()
+
"Helper"
).
newInstance
();
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"cpu '"
+
cpu
+
"' is not yet supported!"
);
}
}
}
...
...
agent/src/share/classes/sun/jvm/hotspot/utilities/AltPlatformInfo.java
0 → 100644
浏览文件 @
32ce5291
/*
* Copyright (c) 2000, 2012, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
package
sun.jvm.hotspot.utilities
;
public
interface
AltPlatformInfo
{
// Additional cpu types can be tested via this interface
public
boolean
knownCPU
(
String
cpu
);
}
\ No newline at end of file
agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java
浏览文件 @
32ce5291
...
...
@@ -64,6 +64,13 @@ public class PlatformInfo {
}
else
if
(
cpu
.
equals
(
"ia64"
)
||
cpu
.
equals
(
"amd64"
)
||
cpu
.
equals
(
"x86_64"
))
{
return
cpu
;
}
else
{
try
{
Class
pic
=
Class
.
forName
(
"sun.jvm.hotspot.utilities.PlatformInfoClosed"
);
AltPlatformInfo
api
=
(
AltPlatformInfo
)
pic
.
newInstance
();
if
(
api
.
knownCPU
(
cpu
))
{
return
cpu
;
}
}
catch
(
Exception
e
)
{}
throw
new
UnsupportedPlatformException
(
"CPU type "
+
cpu
+
" not yet supported"
);
}
}
...
...
make/defs.make
浏览文件 @
32ce5291
...
...
@@ -22,6 +22,14 @@
#
#
ifeq
($(HS_ALT_MAKE),)
ifneq
($(OPENJDK),true)
HS_ALT_MAKE
=
$(GAMMADIR)
/make/closed
else
HS_ALT_MAKE
=
NO_SUCH_PATH
endif
endif
# The common definitions for hotspot builds.
# Optionally include SPEC file generated by configure.
...
...
@@ -327,3 +335,4 @@ EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h
ifndef
JAVASE_EMBEDDED
EXPORT_LIST
+=
$(EXPORT_INCLUDE_DIR)
/jfr.h
endif
make/linux/makefiles/defs.make
浏览文件 @
32ce5291
...
...
@@ -295,6 +295,8 @@ ADD_SA_BINARIES/ia64 =
ADD_SA_BINARIES/
arm
=
ADD_SA_BINARIES/
zero
=
-include
$(HS_ALT_MAKE)/linux/makefiles/defs.make
EXPORT_LIST
+=
$
(
ADD_SA_BINARIES/
$(HS_ARCH)
)
make/linux/makefiles/sa.make
浏览文件 @
32ce5291
...
...
@@ -30,10 +30,16 @@
include
$(GAMMADIR)/make/linux/makefiles/rules.make
include
$(GAMMADIR)/make/defs.make
include
$(GAMMADIR)/make/altsrc.make
AGENT_DIR
=
$(GAMMADIR)
/agent
include
$(GAMMADIR)/make/sa.files
-include
$(HS_ALT_MAKE)/linux/makefiles/sa.make
TOPDIR
=
$(
shell
echo
`
pwd
`
)
GENERATED
=
$(TOPDIR)
/../generated
...
...
@@ -52,17 +58,15 @@ SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VE
SA_PROPERTIES
=
$(SA_CLASSDIR)
/sa.properties
# if $(AGENT_DIR) does not exist, we don't build SA
# also, we don't build SA on Itanium
, PowerPC, ARM
or zero.
# also, we don't build SA on Itanium or zero.
all
:
if
[
-d
$(AGENT_DIR)
-a
"
$(SRCARCH)
"
!=
"ia64"
\
-a
"
$(SRCARCH)
"
!=
"arm"
\
-a
"
$(SRCARCH)
"
!=
"ppc"
\
-a
"
$(SRCARCH)
"
!=
"zero"
]
;
then
\
$(MAKE)
-f
sa.make
$(GENERATED)
/sa-jdi.jar
;
\
fi
$(GENERATED)/sa-jdi.jar
:
$(AGENT_FILES)
$(GENERATED)/sa-jdi.jar
:
:
$(AGENT_FILES)
$(QUIETLY)
echo
"Making
$@
"
$(QUIETLY)
if
[
"
$(BOOT_JAVA_HOME)
"
=
""
]
;
then
\
echo
"ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"
;
\
...
...
@@ -111,3 +115,5 @@ clean:
rm
-rf
$(SA_CLASSDIR)
rm
-rf
$(GENERATED)
/sa-jdi.jar
rm
-rf
$(AGENT_FILES_LIST)
-include
$(HS_ALT_MAKE)/linux/makefiles/sa-rules.make
make/linux/makefiles/saproc.make
浏览文件 @
32ce5291
...
...
@@ -21,6 +21,8 @@
# questions.
#
#
include
$(GAMMADIR)/make/defs.make
include
$(GAMMADIR)/make/altsrc.make
# Rules to build serviceability agent library, used by vm.make
...
...
@@ -48,6 +50,8 @@ SASRCFILES = $(SASRCDIR)/salibelf.c \
$(SASRCDIR)
/ps_core.c
\
$(SASRCDIR)
/LinuxDebuggerLocal.c
-include
$(HS_ALT_MAKE)/linux/makefiles/saproc.make
SAMAPFILE
=
$(SASRCDIR)
/mapfile
DEST_SAPROC
=
$(JDK_LIBDIR)
/
$(LIBSAPROC)
...
...
@@ -60,15 +64,19 @@ ifeq ($(DEBUG_BINARIES), true)
endif
# if $(AGENT_DIR) does not exist, we don't build SA
# also, we don't build SA on Itanium
, PPC, ARM
or zero.
# also, we don't build SA on Itanium or zero.
ifneq
($(wildcard $(AGENT_DIR)),)
ifneq
($(filter-out ia64
arm ppc
zero,$(SRCARCH)),)
ifneq
($(filter-out ia64 zero,$(SRCARCH)),)
BUILDLIBSAPROC
=
$(LIBSAPROC)
endif
endif
ifneq
($(ALT_SASRCDIR),)
ALT_SAINCDIR
=
-I
$(ALT_SASRCDIR)
else
ALT_SAINCDIR
=
endif
SA_LFLAGS
=
$
(
MAPFLAG:FILENAME
=
$(SAMAPFILE)
)
$(LDFLAGS_HASH_STYLE)
$(LIBSAPROC)
:
$(SASRCFILES) $(SAMAPFILE)
...
...
@@ -84,6 +92,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
-I
$(GENERATED)
\
-I
$(BOOT_JAVA_HOME)
/include
\
-I
$(BOOT_JAVA_HOME)
/include/
$(Platform_os_family)
\
$(ALT_SAINCDIR)
\
$(SASRCFILES)
\
$(SA_LFLAGS)
\
$(SA_DEBUG_CFLAGS)
\
...
...
make/pic.make
浏览文件 @
32ce5291
...
...
@@ -32,7 +32,7 @@ ifneq ($(OSNAME), windows)
ifndef
LP64
PARTIAL_NONPIC
=
1
endif
PIC_ARCH
=
ppc
PIC_ARCH
=
ppc
arm
ifneq
("$(filter $(PIC_ARCH),$(BUILDARCH))","")
PARTIAL_NONPIC
=
0
endif
...
...
src/share/vm/runtime/vmStructs.cpp
浏览文件 @
32ce5291
...
...
@@ -2135,6 +2135,7 @@ typedef TwoOopHashtable<Symbol*, mtClass> SymbolTwoOopHashtable;
/******************/
\
\
declare_constant(UseTLAB) \
declare_constant(EnableInvokeDynamic) \
\
/**************/
\
/* Stack bias */
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录