From 4031383e22aef393a2e6642871fb519a23304d11 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Fri, 19 Jul 2019 13:32:32 -0700 Subject: [PATCH] Categorize [anon:stack_and_tls:{}] as stack memory Bug: http://b/134795155 Test: run "dumpsys meminfo" and verify that this CL increases the reported stack memory usage Change-Id: Id929671d6c52ba92b4ea11c83297f3af3ced89e4 Merged-In: Id929671d6c52ba92b4ea11c83297f3af3ced89e4 --- core/jni/android_os_Debug.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index 14dbabb1ce022..8a89ed9acace3 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -259,6 +259,8 @@ static void load_maps(int pid, stats_t* stats, bool* foundSwapPss) which_heap = HEAP_NATIVE; } else if (base::StartsWith(name, "[stack")) { which_heap = HEAP_STACK; + } else if (base::StartsWith(name, "[anon:stack_and_tls:")) { + which_heap = HEAP_STACK; } else if (base::EndsWith(name, ".so")) { which_heap = HEAP_SO; is_swappable = true;