0

What I'm talking about is the Method Profiling in Eclipse or Android Device Monitor. When you choose a process from the list and press the button(I can't post image, the button is in the left of the 'stop' button), it will start recording the function stack of the process, and show you a detailed chart after you press stop.

What I want to know is how does it work? How does it get the function stack of a process by just knowing the pid? Does it use hook or something to do this?

Misty Zhu
  • 83
  • 2
  • 7

1 Answers1

0

OK, I'm answering my own question. If you want to know how something works, you the best read the source code. The source code can be found here : https://android.googlesource.com/platform/sdk/+archive/796b6c0491833587ba096a33bd0d34329f6213c5/ddms.tar.gz It's actually the code of DDMS. When you are reading the code, you can find even more useful information in the comments. Good luck!

Misty Zhu
  • 83
  • 2
  • 7