Commit Graph

25 Commits

Author SHA1 Message Date
Android (Google) Code Review
7ade5c7e29 am d7dc91d7: Merge change 2030 into donut
Merge commit 'd7dc91d749b920734c9e9f0a21c7c7e9672ef8b6'

* commit 'd7dc91d749b920734c9e9f0a21c7c7e9672ef8b6':
  Add new trace tool for displaying all the memory regions in a process.
2009-05-20 09:21:20 -07:00
Android (Google) Code Review
68b4a04515 am b260872e: Merge change 2024 into donut
Merge commit 'b260872ea4ab52286e1abfa4e79d12feb3d46253'

* commit 'b260872ea4ab52286e1abfa4e79d12feb3d46253':
  Add support for native (JNI) calls to the trace tools.
2009-05-20 09:21:20 -07:00
Jack Veenstra
ceb9788070 Add new trace tool for displaying all the memory regions in a process. 2009-05-19 17:37:00 -07:00
Android (Google) Code Review
9bdeda63c4 am b08d3a39: Merge change 2004 into donut
Merge commit 'b08d3a396914b1aaba1270a9021289bdbe3cac5f'

* commit 'b08d3a396914b1aaba1270a9021289bdbe3cac5f':
  Handle munmap() and add support for tracing JNI (native) calls.
2009-05-19 17:34:56 -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
Android (Google) Code Review
4aa2dd7dfc am bba5ffb: Merge change 1347 into donut
Merge commit 'bba5ffb847d10a65ce323f3c607f9f842c21e0c1'

* commit 'bba5ffb847d10a65ce323f3c607f9f842c21e0c1':
  Add a new program for checking the correctness of the computed stack from a trace.
2009-05-11 18:24:36 -07:00
Android (Google) Code Review
19837b5331 am e14d320: Merge change 1346 into donut
Merge commit 'e14d320465bc14fd413c3e735643fccb7020db2b'

* commit 'e14d320465bc14fd413c3e735643fccb7020db2b':
  Better output for viewing the method trace.
2009-05-11 18:24:36 -07:00
Android (Google) Code Review
2d1fa2b83a am 6b56383: Merge changes 1344,1345 into donut
Merge commit '6b56383a3a9f086700436269e10602bb234cc25d'

* commit '6b56383a3a9f086700436269e10602bb234cc25d':
  Fix the tracing code that keeps track of the Java method stack.
  Add a "-d time" option to stack_dump to dump the stack at the given time.
2009-05-11 18:24:35 -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
Android (Google) Code Review
af47328d64 am 2822ae3: Merge change 1343 into donut
Merge commit '2822ae37115ebf13412bbef91339ee0d9454525e'

* commit '2822ae37115ebf13412bbef91339ee0d9454525e':
  Fix compiler warnings by changing "char*" to "const char*".
2009-05-11 15:14:46 -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
Android (Google) Code Review
d89d9b37a0 am 5ea0a94: Merge change 657 into donut
Merge commit '5ea0a9436cda662264cc0dcf92d3559d532383bb'

* commit '5ea0a9436cda662264cc0dcf92d3559d532383bb':
  Fix a memory deallocation error that was crashing q2dm.
2009-04-29 12:06:41 -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
Scott Tsai
eda65f5f60 q2dm: correctly expect the return type of strchr(const char*) to be
'const char*' in C++ so that the code builds on gcc-4.4

ISO C++ overloads strchr() so that strchr(const char*) return 'const
char*' and strchr(char *) return 'char *'.
Since DmTrace::parseAndAddFunction really wants to write to its 'const
char *name' argument I just casted a pointer pointing inside of 'name' to 'char*'
2009-03-21 08:17:41 +08:00
Scott Tsai
0c4ee7741c Correctly expect the return value of rindex(const char*) to be of type
'const char*' to make the code build on gcc-4.4.

The C++ spec overloads string fucntions like strtsr and rindex so that
rindex(char *) returns 'char*' and rindex(const char*) returns 'const
char*'.
Without this patch you get an "invalid conversion from ‘const char*’ to
‘char*’" error on gcc-4.4
2009-03-21 07:41:30 +08: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
e60601ff6b auto import from //branches/cupcake/...@125939 2009-01-09 18:26:25 -08:00
The Android Open Source Project
95cf464c5a auto import from //branches/cupcake/...@125939 2009-01-09 17:51:19 -08:00
Alexey Zaytsev
62da4d9357 Add a few missing headers
Fixes build with gcc 4.3.2 on Debian.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
2008-10-22 02:03:57 +04:00
The Android Open Source Project
5c11852110 Initial Contribution 2008-10-21 07:00:00 -07:00