summaryrefslogtreecommitdiffstats
path: root/vm/Profile.h
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2010-01-22 16:36:30 -0800
committerAndy McFadden <fadden@android.com>2010-01-27 14:59:20 -0800
commit0171812e59e2520a4345b9bbadd4f7afa0a1de16 (patch)
tree8eb7ba7df9131b218631775caa2d8eb081bb925f /vm/Profile.h
parentbdca5d668ebf34b769b9764a75d5bc12219579a5 (diff)
downloadandroid_dalvik-0171812e59e2520a4345b9bbadd4f7afa0a1de16.tar.gz
android_dalvik-0171812e59e2520a4345b9bbadd4f7afa0a1de16.tar.bz2
android_dalvik-0171812e59e2520a4345b9bbadd4f7afa0a1de16.zip
Add streaming method profiling support.
The goal is to allow DDMS to start/stop method profiling in apps that don't have permission to write to /sdcard. Instead of writing the profiling data to disk and then pulling it off, we just blast the whole thing straight from memory. This includes: - New method tracing start call (startMethodTracingDdms). - Rearrangement of existing VMDebug method tracing calls for sanity. - Addition of "vector" chunk send function, with corresponding update to the JDWP transport function. - Reshuffled the method trace start interlock, which seemed racy. - Post new method-trace-profiling-streaming feature to DDMS. Also: - Added an internal exception-throw function that allows a printf format string, so we can put useful detail into exception messages. For bug 2160407.
Diffstat (limited to 'vm/Profile.h')
-rw-r--r--vm/Profile.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm/Profile.h b/vm/Profile.h
index d5dbea280..7cac150e2 100644
--- a/vm/Profile.h
+++ b/vm/Profile.h
@@ -39,7 +39,6 @@ void dvmProfilingShutdown(void);
/*
* Method trace state. This is currently global. In theory we could make
* most of this per-thread.
- *
*/
typedef struct MethodTraceState {
/* these are set during VM init */
@@ -50,6 +49,7 @@ typedef struct MethodTraceState {
pthread_mutex_t startStopLock;
pthread_cond_t threadExitCond;
FILE* traceFile;
+ bool directToDdms;
int bufferSize;
int flags;
@@ -97,7 +97,7 @@ typedef struct AllocProfState {
* Start/stop method tracing.
*/
void dvmMethodTraceStart(const char* traceFileName, int traceFd, int bufferSize,
- int flags);
+ int flags, bool directToDdms);
bool dvmIsMethodTraceActive(void);
void dvmMethodTraceStop(void);