From 0171812e59e2520a4345b9bbadd4f7afa0a1de16 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Fri, 22 Jan 2010 16:36:30 -0800 Subject: 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. --- vm/Exception.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'vm/Exception.h') diff --git a/vm/Exception.h b/vm/Exception.h index 404434548..f53c0bfcb 100644 --- a/vm/Exception.h +++ b/vm/Exception.h @@ -34,6 +34,20 @@ INLINE void dvmThrowException(const char* exceptionDescriptor, dvmThrowChainedException(exceptionDescriptor, msg, NULL); } +/* + * 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. */ -- cgit v1.2.3