summaryrefslogtreecommitdiffstats
path: root/vm/native/dalvik_system_VMDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm/native/dalvik_system_VMDebug.cpp')
-rw-r--r--vm/native/dalvik_system_VMDebug.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/vm/native/dalvik_system_VMDebug.cpp b/vm/native/dalvik_system_VMDebug.cpp
index 53773575f..227d1c16f 100644
--- a/vm/native/dalvik_system_VMDebug.cpp
+++ b/vm/native/dalvik_system_VMDebug.cpp
@@ -244,7 +244,7 @@ static void Dalvik_dalvik_system_VMDebug_startMethodTracingDdmsImpl(const u4* ar
/*
* static void startMethodTracingFd(String traceFileName, FileDescriptor fd,
- * int bufferSize, int flags)
+ * int bufferSize, int flags, boolean samplingEnabled, int intervalUs)
*
* Start method trace profiling, sending results to a file descriptor.
*/
@@ -255,6 +255,8 @@ static void Dalvik_dalvik_system_VMDebug_startMethodTracingFd(const u4* args,
Object* traceFd = (Object*) args[1];
int bufferSize = args[2];
int flags = args[3];
+ bool samplingEnabled = args[4];
+ int intervalUs = args[5];
int origFd = getFileDescriptor(traceFd);
if (origFd < 0)
@@ -272,14 +274,15 @@ static void Dalvik_dalvik_system_VMDebug_startMethodTracingFd(const u4* args,
RETURN_VOID();
}
- dvmMethodTraceStart(traceFileName, fd, bufferSize, flags, false, false, 0);
+ dvmMethodTraceStart(traceFileName, fd, bufferSize, flags, false,
+ samplingEnabled, intervalUs);
free(traceFileName);
RETURN_VOID();
}
/*
* static void startMethodTracingFilename(String traceFileName, int bufferSize,
- * int flags)
+ * int flags, boolean samplingEnabled, int intervalUs)
*
* Start method trace profiling, sending results to a file.
*/
@@ -289,13 +292,16 @@ static void Dalvik_dalvik_system_VMDebug_startMethodTracingFilename(const u4* ar
StringObject* traceFileStr = (StringObject*) args[0];
int bufferSize = args[1];
int flags = args[2];
+ bool samplingEnabled = args[3];
+ int intervalUs = args[4];
char* traceFileName = dvmCreateCstrFromString(traceFileStr);
if (traceFileName == NULL) {
RETURN_VOID();
}
- dvmMethodTraceStart(traceFileName, -1, bufferSize, flags, false, false, 0);
+ dvmMethodTraceStart(traceFileName, -1, bufferSize, flags, false,
+ samplingEnabled, intervalUs);
free(traceFileName);
RETURN_VOID();
}
@@ -823,9 +829,9 @@ const DalvikNativeMethod dvm_dalvik_system_VMDebug[] = {
Dalvik_dalvik_system_VMDebug_stopAllocCounting },
{ "startMethodTracingDdmsImpl", "(IIZI)V",
Dalvik_dalvik_system_VMDebug_startMethodTracingDdmsImpl },
- { "startMethodTracingFd", "(Ljava/lang/String;Ljava/io/FileDescriptor;II)V",
+ { "startMethodTracingFd", "(Ljava/lang/String;Ljava/io/FileDescriptor;IIZI)V",
Dalvik_dalvik_system_VMDebug_startMethodTracingFd },
- { "startMethodTracingFilename", "(Ljava/lang/String;II)V",
+ { "startMethodTracingFilename", "(Ljava/lang/String;IIZI)V",
Dalvik_dalvik_system_VMDebug_startMethodTracingFilename },
{ "getMethodTracingMode", "()I",
Dalvik_dalvik_system_VMDebug_getMethodTracingMode },