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


Handle heap status updates.

Summary

Fields

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

Public methods

void clientDisconnected(ClientImpl client)

Client went away.

void clientReady(ClientImpl client)

Client is ready.

void handleChunk(ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)

Chunk handler entry point.

static void register(MonitorThread mt)

Register for the packets we expect to get from the client.

static void sendMPRE(ClientImpl client)

Send a MPRE (Method PRofiling End) request to the client.

static void sendMPRQ(ClientImpl client)

Send a MPRQ (Method PRofiling Query) request to the client.

static void sendMPRS(ClientImpl client, String fileName, int bufferSize, int flags)

Send a MPRS (Method PRofiling Start) request to the client.

static void sendMPSE(ClientImpl client)

Send a MPSE (Method Profiling Streaming End) request to the client.

static void sendMPSS(ClientImpl client, int bufferSize, int flags)

Send a MPSS (Method Profiling Streaming Start) request to the client.

static void sendSPSE(ClientImpl client)

Send a SPSE (Sampling Profiling Streaming End) request to the client.

static void sendSPSS(ClientImpl client, int bufferSize, int samplingInterval, TimeUnit samplingIntervalTimeUnits)

Send a SPSS (Sampling Profiling Streaming Start) request to the client.

Fields

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

Public methods

clientDisconnected

public void clientDisconnected (ClientImpl client)

Client went away.

Parameters
client ClientImpl

clientReady

public void clientReady (ClientImpl client)

Client is ready.

Parameters
client ClientImpl

handleChunk

public void handleChunk (ClientImpl client, 
                int type, 
                ByteBuffer data, 
                boolean isReply, 
                int msgId)

Chunk handler entry point.

Parameters
client ClientImpl

type int

data ByteBuffer

isReply boolean

msgId int

register

public static void register (MonitorThread mt)

Register for the packets we expect to get from the client.

Parameters
mt MonitorThread

sendMPRE

public static void sendMPRE (ClientImpl client)

Send a MPRE (Method PRofiling End) request to the client.

Parameters
client ClientImpl

sendMPRQ

public static void sendMPRQ (ClientImpl client)

Send a MPRQ (Method PRofiling Query) request to the client.

Parameters
client ClientImpl

sendMPRS

public static void sendMPRS (ClientImpl client, 
                String fileName, 
                int bufferSize, 
                int flags)

Send a MPRS (Method PRofiling Start) request to the client.

The arguments to this method will eventually be passed to android.os.Debug.startMethodTracing() on the device.

Parameters
client ClientImpl

fileName String: is the name of the file to which profiling data will be written (on the device);

bufferSize int: is the desired buffer size in bytes (8MB is good)

flags int: see startMethodTracing() docs; use 0 for default behavior

sendMPSE

public static void sendMPSE (ClientImpl client)

Send a MPSE (Method Profiling Streaming End) request to the client.

Parameters
client ClientImpl

sendMPSS

public static void sendMPSS (ClientImpl client, 
                int bufferSize, 
                int flags)

Send a MPSS (Method Profiling Streaming Start) request to the client.

The arguments to this method will eventually be passed to android.os.Debug.startMethodTracing() on the device.

Parameters
client ClientImpl

bufferSize int: is the desired buffer size in bytes (8MB is good)

flags int: see startMethodTracing() docs; use 0 for default behavior

sendSPSE

public static void sendSPSE (ClientImpl client)

Send a SPSE (Sampling Profiling Streaming End) request to the client.

Parameters
client ClientImpl

sendSPSS

public static void sendSPSS (ClientImpl client, 
                int bufferSize, 
                int samplingInterval, 
                TimeUnit samplingIntervalTimeUnits)

Send a SPSS (Sampling Profiling Streaming Start) request to the client.

Parameters
client ClientImpl

bufferSize int: is the desired buffer size in bytes (8MB is good)

samplingInterval int: sampling interval

samplingIntervalTimeUnits TimeUnit: units for sampling interval