HandleHeap
public
final
class
HandleHeap
extends ChunkHandler
| java.lang.Object | |||
| ↳ | com.android.tradefed.device.server.jdwp.JdwpInterceptor | ||
| ↳ | com.android.tradefed.device.server.jdwp.chunkhandler.ChunkHandler | ||
| ↳ | com.android.tradefed.device.server.jdwp.chunkhandler.HandleHeap | ||
处理堆状态更新。
摘要
常量 | |
|---|---|
int |
HPIF_WHEN_EVERY_GC
|
int |
HPIF_WHEN_NEVER
|
int |
HPIF_WHEN_NEXT_GC
|
int |
HPIF_WHEN_NOW
|
int |
WHAT_MERGE
|
int |
WHAT_OBJ
|
int |
WHEN_DISABLE
|
int |
WHEN_GC
|
字段 | |
|---|---|
public
static
final
int |
CHUNK_HPDS
|
public
static
final
int |
CHUNK_HPDU
|
public
static
final
int |
CHUNK_HPEN
|
public
static
final
int |
CHUNK_HPGC
|
public
static
final
int |
CHUNK_HPIF
|
public
static
final
int |
CHUNK_HPSG
|
public
static
final
int |
CHUNK_HPST
|
public
static
final
int |
CHUNK_REAE
|
public
static
final
int |
CHUNK_REAL
|
public
static
final
int |
CHUNK_REAQ
|
公共方法 | |
|---|---|
void
|
clientDisconnected(ClientImpl client)
客户端已消失。 |
void
|
clientReady(ClientImpl client)
客户端已准备就绪。 |
void
|
handleChunk(ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)
块处理程序入口点。 |
static
void
|
register(MonitorThread mt)
注册我们预期会从客户端收到的数据包。 |
static
void
|
sendHPDS(ClientImpl client)
向客户端发送 HPDS 请求。 |
static
void
|
sendHPDU(ClientImpl client, String fileName)
向客户端发送 HPDU 请求。 |
static
void
|
sendHPGC(ClientImpl client)
向客户端发送 HPGC 请求。 |
static
void
|
sendHPIF(ClientImpl client, int when)
向客户端发送 HPIF(堆信息)请求。 |
static
void
|
sendHPSG(ClientImpl client, int when, int what)
向客户端发送 HPSG(堆段)请求。 |
static
void
|
sendREAE(ClientImpl client, boolean enable)
向客户端发送 REAE(近期分配启用)请求。 |
static
void
|
sendREAL(ClientImpl client)
向客户端发送 REAL(最近分配)请求。 |
static
void
|
sendREAQ(ClientImpl client)
向客户端发送 REAQ(近期分配查询)请求。 |
常量
HPIF_WHEN_EVERY_GC
public static final int HPIF_WHEN_EVERY_GC
常量值: 3 (0x00000003)
HPIF_WHEN_NEVER
public static final int HPIF_WHEN_NEVER
常量值: 0 (0x00000000)
HPIF_WHEN_NEXT_GC
public static final int HPIF_WHEN_NEXT_GC
常量值: 2 (0x00000002)
HPIF_WHEN_NOW
public static final int HPIF_WHEN_NOW
常量值: 1 (0x00000001)
WHAT_MERGE
public static final int WHAT_MERGE
常量值: 0 (0x00000000)
WHAT_OBJ
public static final int WHAT_OBJ
常量值: 1 (0x00000001)
WHEN_DISABLE
public static final int WHEN_DISABLE
常量值: 0 (0x00000000)
WHEN_GC
public static final int WHEN_GC
常量值: 1 (0x00000001)
字段
CHUNK_HPDS
public static final int CHUNK_HPDS
CHUNK_HPDU
public static final int CHUNK_HPDU
CHUNK_HPEN
public static final int CHUNK_HPEN
CHUNK_HPGC
public static final int CHUNK_HPGC
CHUNK_HPIF
public static final int CHUNK_HPIF
CHUNK_HPSG
public static final int CHUNK_HPSG
CHUNK_HPST
public static final int CHUNK_HPST
CHUNK_REAE
public static final int CHUNK_REAE
CHUNK_REAL
public static final int CHUNK_REAL
CHUNK_REAQ
public static final int CHUNK_REAQ
公共方法
handleChunk
public void handleChunk (ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)
块处理程序入口点。
| 参数 | |
|---|---|
client |
ClientImpl |
type |
int |
data |
ByteBuffer |
isReply |
boolean |
msgId |
int |
sendHPDS
public static void sendHPDS (ClientImpl client)
向客户端发送 HPDS 请求。
堆转储完成后,我们将收到 HPDS 响应。如果失败,我们会收到常规的失败响应。
与 HPDU 相比,此方法对设备的开销更大,因为整个堆转储都保存在 RAM 中,而不是假脱机到临时文件。另一方面,无需写入 /sdcard 的权限。
| 参数 | |
|---|---|
client |
ClientImpl |
sendHPDU
public static void sendHPDU (ClientImpl client, String fileName)
向客户端发送 HPDU 请求。
堆转储完成后,我们将收到 HPDU 响应。如果失败,我们会收到常规的失败响应。
| 参数 | |
|---|---|
client |
ClientImpl |
fileName |
String:输出文件(在设备上)的名称 |
sendHPIF
public static void sendHPIF (ClientImpl client, int when)
向客户端发送 HPIF(HeaP InFo)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
when |
int |
sendHPSG
public static void sendHPSG (ClientImpl client, int when, int what)
向客户端发送 HPSG(堆段)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
when |
int |
what |
int |
sendREAE
public static void sendREAE (ClientImpl client, boolean enable)
向客户端发送 REAE(最近分配启用)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
enable |
boolean |
sendREAQ
public static void sendREAQ (ClientImpl client)
向客户端发送 REAQ(近期分配查询)请求。
| 参数 | |
|---|---|
client |
ClientImpl |