HandleProfiling
public
final
class
HandleProfiling
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.HandleProfiling | ||
处理堆状态更新。
摘要
字段 | |
|---|---|
public
static
final
int |
CHUNK_FAIL
|
public
static
final
int |
CHUNK_MPRE
|
public
static
final
int |
CHUNK_MPRQ
|
public
static
final
int |
CHUNK_MPRS
|
public
static
final
int |
CHUNK_MPSE
|
public
static
final
int |
CHUNK_MPSS
|
public
static
final
int |
CHUNK_SPSE
|
public
static
final
int |
CHUNK_SPSS
|
公共方法 | |
|---|---|
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
|
sendMPRE(ClientImpl client)
向客户端发送 MPRE(方法分析结束)请求。 |
static
void
|
sendMPRQ(ClientImpl client)
向客户端发送 MPRQ(方法分析查询)请求。 |
static
void
|
sendMPRS(ClientImpl client, String fileName, int bufferSize, int flags)
向客户端发送 MPRS(方法分析开始)请求。 |
static
void
|
sendMPSE(ClientImpl client)
向客户端发送 MPSE(方法分析流式传输结束)请求。 |
static
void
|
sendMPSS(ClientImpl client, int bufferSize, int flags)
向客户端发送 MPSS(方法分析流式传输开始)请求。 |
static
void
|
sendSPSE(ClientImpl client)
向客户端发送 SPSE(采样分析流式传输结束)请求。 |
static
void
|
sendSPSS(ClientImpl client, int bufferSize, int samplingInterval, TimeUnit samplingIntervalTimeUnits)
向客户端发送 SPSS(抽样分析流式传输开始)请求。 |
字段
CHUNK_FAIL
public static final int CHUNK_FAIL
CHUNK_MPRE
public static final int CHUNK_MPRE
CHUNK_MPRQ
public static final int CHUNK_MPRQ
CHUNK_MPRS
public static final int CHUNK_MPRS
CHUNK_MPSE
public static final int CHUNK_MPSE
CHUNK_MPSS
public static final int CHUNK_MPSS
CHUNK_SPSE
public static final int CHUNK_SPSE
CHUNK_SPSS
public static final int CHUNK_SPSS
公共方法
handleChunk
public void handleChunk (ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)
块处理程序入口点。
| 参数 | |
|---|---|
client |
ClientImpl |
type |
int |
data |
ByteBuffer |
isReply |
boolean |
msgId |
int |
sendMPRE
public static void sendMPRE (ClientImpl client)
向客户端发送 MPRE(方法分析结束)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
sendMPRQ
public static void sendMPRQ (ClientImpl client)
向客户端发送 MPRQ(方法分析查询)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
sendMPRS
public static void sendMPRS (ClientImpl client, String fileName, int bufferSize, int flags)
向客户端发送 MPRS(方法分析开始)请求。
此方法的实参最终将传递给设备上的 android.os.Debug.startMethodTracing()。
| 参数 | |
|---|---|
client |
ClientImpl |
fileName |
String:是将剖析数据写入到的文件(在设备上)的名称; |
bufferSize |
int:所需的缓冲区大小(以字节为单位)(8MB 效果不错) |
flags |
int:请参阅 startMethodTracing() 文档;使用 0 表示默认行为 |
sendMPSE
public static void sendMPSE (ClientImpl client)
向客户端发送 MPSE(方法分析流式传输结束)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
sendMPSS
public static void sendMPSS (ClientImpl client, int bufferSize, int flags)
向客户端发送 MPSS(方法分析流式传输开始)请求。
此方法的实参最终将传递给设备上的 android.os.Debug.startMethodTracing()。
| 参数 | |
|---|---|
client |
ClientImpl |
bufferSize |
int:所需的缓冲区大小(以字节为单位)(8MB 效果不错) |
flags |
int:请参阅 startMethodTracing() 文档;使用 0 表示默认行为 |
sendSPSE
public static void sendSPSE (ClientImpl client)
向客户端发送 SPSE(采样分析流式传输结束)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
sendSPSS
public static void sendSPSS (ClientImpl client, int bufferSize, int samplingInterval, TimeUnit samplingIntervalTimeUnits)
向客户端发送 SPSS(抽样分析流式传输开始)请求。
| 参数 | |
|---|---|
client |
ClientImpl |
bufferSize |
int:所需的缓冲区大小(以字节为单位)(8MB 效果不错) |
samplingInterval |
int:采样间隔 |
samplingIntervalTimeUnits |
TimeUnit:采样间隔的单位 |