summaryrefslogtreecommitdiffstats
path: root/vm/Exception.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/Exception.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/Exception.h')
-rw-r--r--vm/Exception.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/vm/Exception.h b/vm/Exception.h
index 404434548..f53c0bfcb 100644
--- a/vm/Exception.h
+++ b/vm/Exception.h
@@ -35,6 +35,20 @@ INLINE void dvmThrowException(const char* exceptionDescriptor,
}
/*
+ * Like dvmThrowChainedException, but takes printf-style args for the message.
+ */
+void dvmThrowExceptionFmtV(const char* exceptionDescriptor, const char* fmt,
+ va_list args);
+INLINE void dvmThrowExceptionFmt(const char* exceptionDescriptor,
+ const char* fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ dvmThrowExceptionFmtV(exceptionDescriptor, fmt, args);
+ va_end(args);
+}
+
+/*
* Throw an exception in the current thread, by class object.
*/
void dvmThrowChainedExceptionByClass(ClassObject* exceptionClass,