diff options
author | Mathieu Chartier <mathieuc@google.com> | 2019-03-28 13:13:05 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2019-03-29 14:37:36 -0700 |
commit | 0b3a54e0922cb67e149b9809b28a085f4c789c39 (patch) | |
tree | 568d682a462ade94217acdd05e77e89982b6dedd | |
parent | e11d6c50d8c743ea304b3c1bc7d3842ea65af17e (diff) |
Add VMDebug.setAllocTrackerStackDepth API
Sets the number of frames recorded for each allocation when
allocation tracking is enabled.
Test: test-art-host
Bug: 37291459
Change-Id: I5d884efd798588c1ca684567d865f9acf81455a5
-rw-r--r-- | dalvik/src/main/java/dalvik/system/VMDebug.java | 8 | ||||
-rw-r--r-- | mmodules/core_platform_api/api/platform/current-api.txt | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/dalvik/src/main/java/dalvik/system/VMDebug.java b/dalvik/src/main/java/dalvik/system/VMDebug.java index 1802a72a4b..2a0e4ef586 100644 --- a/dalvik/src/main/java/dalvik/system/VMDebug.java +++ b/dalvik/src/main/java/dalvik/system/VMDebug.java @@ -585,4 +585,12 @@ public final class VMDebug { */ @UnsupportedAppUsage public static native void allowHiddenApiReflectionFrom(Class<?> klass); + + /** + * Sets the number of frames recorded for allocation tracking. + * + * @param stackDepth The number of frames captured for each stack trace. + */ + @libcore.api.CorePlatformApi + public static native void setAllocTrackerStackDepth(int stackDepth); } diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt index edfba01198..bd2be3c2ec 100644 --- a/mmodules/core_platform_api/api/platform/current-api.txt +++ b/mmodules/core_platform_api/api/platform/current-api.txt @@ -703,6 +703,7 @@ package dalvik.system { method @dalvik.annotation.optimization.FastNative public static long lastDebuggerActivity(); method @dalvik.annotation.optimization.FastNative public static void printLoadedClasses(int); method public static void resetAllocCount(int); + method public static void setAllocTrackerStackDepth(int); method public static void startAllocCounting(); method public static void startEmulatorTracing(); method public static void startMethodTracing(String, int, int, boolean, int); |