I have a question about "overhead" of getting call stack trace.Based on my understanding of dalvik code (ArrayObject* dvmDdmGetStackTraceById(u4 threadId) in dalvik/vm/Ddm.cpp file),call stack trace are tracked after all other threads are suspended.
However, "suspend" does not mean suspending all other threads but it means "just wait until all other threads sleep themselves".
So my questions are:
To make all other threads sleeping themselves, does dalvik VM do some special actions such as periodically suspend all threads or something?How all other threads sleeping themselves? In Unix kernel, timer interrupt enforces all threads to sleep periodically. How it works in dalvik VM?
Does "just wait until all other threads sleep themselves" imply that getting call stack trace does not interfere other threads and does not have any impact on the performance of other threads?Thus, does it just have overhead of "waiting time until all other threads sleep themselves" + "tracking call stack trace"?
If someone answer clearly these questions, it would be very helpful to me.Thanks very much!