diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-06-24 16:19:10 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-06-24 16:19:10 -0700 |
commit | 88602190d0831dc3d857db5f753dc384b1e3e8ee (patch) | |
tree | 94cc567ab51b7370992286ea5b4ed1053338db4c /dalvik | |
parent | c536df98910367e15edf6a454d6542118252c2ce (diff) | |
parent | 8205fe4fab4a269a27414009b684595dcec31f4d (diff) | |
download | libcore-88602190d0831dc3d857db5f753dc384b1e3e8ee.zip libcore-88602190d0831dc3d857db5f753dc384b1e3e8ee.tar.gz libcore-88602190d0831dc3d857db5f753dc384b1e3e8ee.tar.bz2 |
am 0f0ae023: Add FileDescriptor variation of startMethodTracing().
Merge commit '0f0ae023a3a53f7c9e254283b50a0099781acb79'
* commit '0f0ae023a3a53f7c9e254283b50a0099781acb79':
Add FileDescriptor variation of startMethodTracing().
Diffstat (limited to 'dalvik')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/VMDebug.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/dalvik/src/main/java/dalvik/system/VMDebug.java b/dalvik/src/main/java/dalvik/system/VMDebug.java index fd2d8ba..06a67b6 100644 --- a/dalvik/src/main/java/dalvik/system/VMDebug.java +++ b/dalvik/src/main/java/dalvik/system/VMDebug.java @@ -16,6 +16,7 @@ package dalvik.system; +import java.io.FileDescriptor; import java.io.IOException; /** @@ -149,8 +150,22 @@ public final class VMDebug { * @param flags flags to control method tracing. The only one that * is currently defined is {@link #TRACE_COUNT_ALLOCS}. */ + public static void startMethodTracing(String traceFileName, + int bufferSize, int flags) { + startMethodTracing(traceFileName, null, bufferSize, flags); + } + + /** + * Like startMethodTracing(String, int, int), but taking an already-opened + * FileDescriptor in which the trace is written. The file name is also + * supplied simply for logging. Makes a dup of the file descriptor. + * + * Not exposed in the SDK unless we are really comfortable with supporting + * this and find it would be useful. + * @hide + */ public static native void startMethodTracing(String traceFileName, - int bufferSize, int flags); + FileDescriptor fd, int bufferSize, int flags); /** * Determine whether method tracing is currently active. |