21

As the title of the question said. Steps I did:

  1. click on Update heap
  2. In Allocation Tracker tab, click "Start Tracking"
  3. Click "Get Allocations"

In the console, I saw red messages saying:

[2013-12-29 13:56:40 - ddm-heap] *** Received REAL`

What happened? am I missing anything?

Thanks

Raptor
  • 53,206
  • 45
  • 230
  • 366
EyeQ Tech
  • 7,198
  • 18
  • 72
  • 126
  • Did you manage to "Get Allocations"? My DDMS on Debian testing retrieves nothing from my usb connected device despite it seeing the phone and app/threads etc. – RichieHH Aug 10 '14 at 12:25

2 Answers2

5

It needs to be done in Android Studio. (Thanks to the Project Member who said this on this bug report: https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=74059)

You can see that the icons even have the same name as the icons in DDMS (which is confusing)! But the Allocation Tracker in DDMS does not work, and the one in Android Studio "Android Monitor" does.

P.S. In the screenshots I was using Android Studio 2.3 and Android Device Monitor version 25.2.2.

Wrong (Does not work):

DDMS Monitor (does not work)

Right (works):

Android Monitor in Android Studio

The results will show up in a window next to your source code like this:

enter image description here

For more info:

https://developer.android.com/studio/profile/am-memory.html https://developer.android.com/studio/profile/am-allocation.html

Rock Lee
  • 9,146
  • 10
  • 55
  • 88
4

Well, REAL is a REcent ALlocation. Based on the source code, logging an error is the very first line of handleREAL(). Just an assumption - this should be Log.d() instead of Log.e(), but I cannot say for sure.

And yes, "Get Allocations" for me works not every time I click it. The resulting log cannot be exported, and disappears as soon as the app on device finishes. Sadly, not a very convenient tracing tool...

Over17
  • 961
  • 7
  • 8
  • Does this tool print this error message when it works as well? Or only when it doesn't work? – nmr Mar 12 '14 at 17:15
  • If my assumption about the source code is correct - then this log message doesn't indicate an error (should be a Debug level message). – Over17 Mar 18 '14 at 09:15
  • 4
    Okay. In reply to myself: this tool does print the error message, even when it works. It, uhh, could stand to be better, Google. – nmr Mar 18 '14 at 18:03