Commit Graph

13 Commits

Author SHA1 Message Date
Jack Veenstra
ceb9788070 Add new trace tool for displaying all the memory regions in a process. 2009-05-19 17:37:00 -07:00
Jack Veenstra
a476e45d1d Add support for native (JNI) calls to the trace tools.
Also fix a bug in profile_pid.cpp and add better output to
stack_dump.cpp.
2009-05-19 16:47:04 -07:00
Jack Veenstra
2bb9bb4546 Handle munmap() and add support for tracing JNI (native) calls.
The munmap() kernel calls are traced but the tracing code wasn't doing
anything with them.  This caused the number of mapped regions in a process
to grow large in some cases and also caused symbol lookup errors in some
rare cases.  This change also adds support for new trace record types
for supporting JNI (native) calls from Java into native code. This helps
with constructing a more accurate call stack.
2009-05-19 15:07:29 -07:00
Jack Veenstra
f55a4d1e9d Add a new program for checking the correctness of the computed stack from a trace.
The check_stack program checks that the generated stack that includes both
native functions and Java methods (generated from the emulator instruction
trace plus the method trace) is consistent with the stack of Java methods
that is computed from the method trace alone. (The method trace is
generated by the Dalvik interpreter).
2009-05-11 17:44:32 -07:00
Jack Veenstra
447a4e4fd6 Better output for viewing the method trace.
This now keeps track of the names of the methods on the stack instead
of just the addresses.  This makes it easier to debug when something goes
wrong.
2009-05-11 17:18:08 -07:00
Jack Veenstra
1298570eb8 Fix the tracing code that keeps track of the Java method stack.
This fixes a bug that was causing a "stack overflow" because it sometimes
wasn't popping off a Java method when it should have.  I also changed the
showStack() method so that instead of always printing to stderr, you can
pass in a FILE* object to print to.
2009-05-11 16:46:48 -07:00
Jack Veenstra
ad6f253016 Add a "-d time" option to stack_dump to dump the stack at the given time. 2009-05-09 11:44:53 -07:00
Jack Veenstra
166d76cf4c Fix compiler warnings by changing "char*" to "const char*". 2009-05-09 11:33:44 -07:00
Jack Veenstra
8b496573a9 Fix a memory deallocation error that was crashing q2dm.
Also fix a bunch of compile warnings by changing "char *" to "const char *".
2009-04-28 13:03:22 -07:00
The Android Open Source Project
52d4c30ca5 auto import from //depot/cupcake/@135843 2009-03-03 19:29:09 -08:00
The Android Open Source Project
d4aee0c0ca auto import from //depot/cupcake/@135843 2009-03-03 18:28:16 -08:00
The Android Open Source Project
95cf464c5a auto import from //branches/cupcake/...@125939 2009-01-09 17:51:19 -08:00
The Android Open Source Project
5c11852110 Initial Contribution 2008-10-21 07:00:00 -07:00