Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
9b0d57a4
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看板
提交
9b0d57a4
编写于
2月 02, 2013
作者:
M
minqi
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
81d0ad1a
4c527bb2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
43 deletion
+30
-43
agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/amd64/WindbgAMD64Thread.java
.../jvm/hotspot/debugger/windbg/amd64/WindbgAMD64Thread.java
+4
-14
agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/x86/WindbgX86Thread.java
.../sun/jvm/hotspot/debugger/windbg/x86/WindbgX86Thread.java
+4
-14
agent/src/share/classes/sun/jvm/hotspot/runtime/OSThread.java
...t/src/share/classes/sun/jvm/hotspot/runtime/OSThread.java
+8
-1
agent/src/share/classes/sun/jvm/hotspot/runtime/win32_amd64/Win32AMD64JavaThreadPDAccess.java
...pot/runtime/win32_amd64/Win32AMD64JavaThreadPDAccess.java
+7
-7
agent/src/share/classes/sun/jvm/hotspot/runtime/win32_x86/Win32X86JavaThreadPDAccess.java
...hotspot/runtime/win32_x86/Win32X86JavaThreadPDAccess.java
+7
-7
未找到文件。
agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/amd64/WindbgAMD64Thread.java
浏览文件 @
9b0d57a4
/*
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005,
2013,
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
...
@@ -34,21 +34,11 @@ class WindbgAMD64Thread implements ThreadProxy {
...
@@ -34,21 +34,11 @@ class WindbgAMD64Thread implements ThreadProxy {
private
boolean
gotID
;
private
boolean
gotID
;
private
long
id
;
private
long
id
;
/** The address argument must be the address of the HANDLE of the
// The address argument must be the address of the OSThread::_thread_id
desired thread in the target process. */
WindbgAMD64Thread
(
WindbgDebugger
debugger
,
Address
addr
)
{
WindbgAMD64Thread
(
WindbgDebugger
debugger
,
Address
addr
)
{
this
.
debugger
=
debugger
;
this
.
debugger
=
debugger
;
// FIXME: size of data fetched here should be configurable.
this
.
sysId
=
(
long
)
addr
.
getCIntegerAt
(
0
,
4
,
true
);
// However, making it so would produce a dependency on the "types"
gotID
=
false
;
// package from the debugger package, which is not desired.
// another hack here is that we use sys thread id instead of handle.
// windbg can't get details based on handles it seems.
// I assume that osThread_win32 thread struct has _thread_id (which
// sys thread id) just after handle field.
this
.
sysId
=
(
int
)
addr
.
addOffsetTo
(
debugger
.
getAddressSize
()).
getCIntegerAt
(
0
,
4
,
true
);
gotID
=
false
;
}
}
WindbgAMD64Thread
(
WindbgDebugger
debugger
,
long
sysId
)
{
WindbgAMD64Thread
(
WindbgDebugger
debugger
,
long
sysId
)
{
...
...
agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/x86/WindbgX86Thread.java
浏览文件 @
9b0d57a4
/*
/*
* Copyright (c) 2002, 20
0
3, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
1
3, 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
...
@@ -34,21 +34,11 @@ class WindbgX86Thread implements ThreadProxy {
...
@@ -34,21 +34,11 @@ class WindbgX86Thread implements ThreadProxy {
private
boolean
gotID
;
private
boolean
gotID
;
private
long
id
;
private
long
id
;
/** The address argument must be the address of the HANDLE of the
// The address argument must be the address of OSThread::_thread_id
desired thread in the target process. */
WindbgX86Thread
(
WindbgDebugger
debugger
,
Address
addr
)
{
WindbgX86Thread
(
WindbgDebugger
debugger
,
Address
addr
)
{
this
.
debugger
=
debugger
;
this
.
debugger
=
debugger
;
// FIXME: size of data fetched here should be configurable.
this
.
sysId
=
(
long
)
addr
.
getCIntegerAt
(
0
,
4
,
true
);
// However, making it so would produce a dependency on the "types"
gotID
=
false
;
// package from the debugger package, which is not desired.
// another hack here is that we use sys thread id instead of handle.
// windbg can't get details based on handles it seems.
// I assume that osThread_win32 thread struct has _thread_id (which
// sys thread id) just after handle field.
this
.
sysId
=
(
int
)
addr
.
addOffsetTo
(
debugger
.
getAddressSize
()).
getCIntegerAt
(
0
,
4
,
true
);
gotID
=
false
;
}
}
WindbgX86Thread
(
WindbgDebugger
debugger
,
long
sysId
)
{
WindbgX86Thread
(
WindbgDebugger
debugger
,
long
sysId
)
{
...
...
agent/src/share/classes/sun/jvm/hotspot/runtime/OSThread.java
浏览文件 @
9b0d57a4
/*
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004,
2013,
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
...
@@ -32,6 +32,7 @@ import sun.jvm.hotspot.types.*;
...
@@ -32,6 +32,7 @@ import sun.jvm.hotspot.types.*;
// to the sys_thread_t structure of the classic JVM implementation.
// to the sys_thread_t structure of the classic JVM implementation.
public
class
OSThread
extends
VMObject
{
public
class
OSThread
extends
VMObject
{
private
static
JIntField
interruptedField
;
private
static
JIntField
interruptedField
;
private
static
JIntField
threadIdField
;
static
{
static
{
VM
.
registerVMInitializedObserver
(
new
Observer
()
{
VM
.
registerVMInitializedObserver
(
new
Observer
()
{
public
void
update
(
Observable
o
,
Object
data
)
{
public
void
update
(
Observable
o
,
Object
data
)
{
...
@@ -43,6 +44,7 @@ public class OSThread extends VMObject {
...
@@ -43,6 +44,7 @@ public class OSThread extends VMObject {
private
static
synchronized
void
initialize
(
TypeDataBase
db
)
{
private
static
synchronized
void
initialize
(
TypeDataBase
db
)
{
Type
type
=
db
.
lookupType
(
"OSThread"
);
Type
type
=
db
.
lookupType
(
"OSThread"
);
interruptedField
=
type
.
getJIntField
(
"_interrupted"
);
interruptedField
=
type
.
getJIntField
(
"_interrupted"
);
threadIdField
=
type
.
getJIntField
(
"_thread_id"
);
}
}
public
OSThread
(
Address
addr
)
{
public
OSThread
(
Address
addr
)
{
...
@@ -52,4 +54,9 @@ public class OSThread extends VMObject {
...
@@ -52,4 +54,9 @@ public class OSThread extends VMObject {
public
boolean
interrupted
()
{
public
boolean
interrupted
()
{
return
((
int
)
interruptedField
.
getValue
(
addr
))
!=
0
;
return
((
int
)
interruptedField
.
getValue
(
addr
))
!=
0
;
}
}
public
int
threadId
()
{
return
(
int
)
threadIdField
.
getValue
(
addr
);
}
}
}
agent/src/share/classes/sun/jvm/hotspot/runtime/win32_amd64/Win32AMD64JavaThreadPDAccess.java
浏览文件 @
9b0d57a4
/*
/*
* Copyright (c) 2005, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
3
, 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
...
@@ -43,7 +43,7 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
...
@@ -43,7 +43,7 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
private
static
AddressField
osThreadField
;
private
static
AddressField
osThreadField
;
// Field from OSThread
// Field from OSThread
private
static
Field
osThreadThread
Handle
Field
;
private
static
Field
osThreadThread
Id
Field
;
// This is currently unneeded but is being kept in case we change
// This is currently unneeded but is being kept in case we change
// the currentFrameGuess algorithm
// the currentFrameGuess algorithm
...
@@ -64,7 +64,7 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
...
@@ -64,7 +64,7 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
osThreadField
=
type
.
getAddressField
(
"_osthread"
);
osThreadField
=
type
.
getAddressField
(
"_osthread"
);
type
=
db
.
lookupType
(
"OSThread"
);
type
=
db
.
lookupType
(
"OSThread"
);
osThreadThread
HandleField
=
type
.
getField
(
"_thread_handle
"
);
osThreadThread
IdField
=
type
.
getField
(
"_thread_id
"
);
}
}
public
Address
getLastJavaFP
(
Address
addr
)
{
public
Address
getLastJavaFP
(
Address
addr
)
{
...
@@ -128,10 +128,10 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
...
@@ -128,10 +128,10 @@ public class Win32AMD64JavaThreadPDAccess implements JavaThreadPDAccess {
// Fetch the OSThread (for now and for simplicity, not making a
// Fetch the OSThread (for now and for simplicity, not making a
// separate "OSThread" class in this package)
// separate "OSThread" class in this package)
Address
osThreadAddr
=
osThreadField
.
getValue
(
addr
);
Address
osThreadAddr
=
osThreadField
.
getValue
(
addr
);
// Get the address of the
HANDLE
within the OSThread
// Get the address of the
thread_id
within the OSThread
Address
thread
Handle
Addr
=
Address
thread
Id
Addr
=
osThreadAddr
.
addOffsetTo
(
osThreadThread
Handle
Field
.
getOffset
());
osThreadAddr
.
addOffsetTo
(
osThreadThread
Id
Field
.
getOffset
());
JVMDebugger
debugger
=
VM
.
getVM
().
getDebugger
();
JVMDebugger
debugger
=
VM
.
getVM
().
getDebugger
();
return
debugger
.
getThreadForIdentifierAddress
(
thread
Handle
Addr
);
return
debugger
.
getThreadForIdentifierAddress
(
thread
Id
Addr
);
}
}
}
}
agent/src/share/classes/sun/jvm/hotspot/runtime/win32_x86/Win32X86JavaThreadPDAccess.java
浏览文件 @
9b0d57a4
/*
/*
* Copyright (c) 2000, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
3
, 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
...
@@ -42,7 +42,7 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
...
@@ -42,7 +42,7 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
private
static
AddressField
osThreadField
;
private
static
AddressField
osThreadField
;
// Field from OSThread
// Field from OSThread
private
static
Field
osThreadThread
Handle
Field
;
private
static
Field
osThreadThread
Id
Field
;
// This is currently unneeded but is being kept in case we change
// This is currently unneeded but is being kept in case we change
// the currentFrameGuess algorithm
// the currentFrameGuess algorithm
...
@@ -63,7 +63,7 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
...
@@ -63,7 +63,7 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
osThreadField
=
type
.
getAddressField
(
"_osthread"
);
osThreadField
=
type
.
getAddressField
(
"_osthread"
);
type
=
db
.
lookupType
(
"OSThread"
);
type
=
db
.
lookupType
(
"OSThread"
);
osThreadThread
HandleField
=
type
.
getField
(
"_thread_handle
"
);
osThreadThread
IdField
=
type
.
getField
(
"_thread_id
"
);
}
}
public
Address
getLastJavaFP
(
Address
addr
)
{
public
Address
getLastJavaFP
(
Address
addr
)
{
...
@@ -127,10 +127,10 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
...
@@ -127,10 +127,10 @@ public class Win32X86JavaThreadPDAccess implements JavaThreadPDAccess {
// Fetch the OSThread (for now and for simplicity, not making a
// Fetch the OSThread (for now and for simplicity, not making a
// separate "OSThread" class in this package)
// separate "OSThread" class in this package)
Address
osThreadAddr
=
osThreadField
.
getValue
(
addr
);
Address
osThreadAddr
=
osThreadField
.
getValue
(
addr
);
// Get the address of the
HANDLE
within the OSThread
// Get the address of the
thread_id
within the OSThread
Address
thread
Handle
Addr
=
Address
thread
Id
Addr
=
osThreadAddr
.
addOffsetTo
(
osThreadThread
Handle
Field
.
getOffset
());
osThreadAddr
.
addOffsetTo
(
osThreadThread
Id
Field
.
getOffset
());
JVMDebugger
debugger
=
VM
.
getVM
().
getDebugger
();
JVMDebugger
debugger
=
VM
.
getVM
().
getDebugger
();
return
debugger
.
getThreadForIdentifierAddress
(
thread
Handle
Addr
);
return
debugger
.
getThreadForIdentifierAddress
(
thread
Id
Addr
);
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录