b74e7190e86d559712747e5cdb31a0d390b7af7d |
16-Feb-2012 |
Iliyan Malchev <malchev@google.com> |
Replace malloc() followed by memset() to zero with calloc() Bionic's calloc() is smart enough to not zero out memory if it gets that memory from an anonyous mmap. Thus, if we use malloc for large allocations, we cause unnecessary memory duplication by following the malloc() with a memset(). An even better approach would be to replace the known large calloc() calls with dvmAllocRegion() allocation. Change-Id: Id308f541c9a040d5929bf991b6c2bfdefb823c3c
prof.cpp
profOutput.cpp
|
c1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef |
06-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/157220 Also fix an occurrence of LOGW missed in an earlier change. Bug: 5449033 Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
prof.cpp
profOutput.cpp
|
4308417beec548c2b2c06ecec4f7f4a965b09fb2 |
04-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ic558031c75b3702d90eb78bd730501ae5d3c077b
prof.cpp
|
7aa9563279627b2ff5413bc895381fc170df9f12 |
07-Jul-2011 |
Doug Kwan <dougkwan@google.com> |
Remove dead code/unused variables to avoid gcc-4.6 warnings. Change-Id: I291fd42e91085c51772f560d424334874bef8add
profHeap.cpp
|
375fb116bcb817b37509ab579dbd55cdbb765cbf |
15-Jun-2011 |
Carl Shapiro <cshapiro@google.com> |
Normalize the include guard style. An leading underscore followed by a capital letter is a reserved name space in C and C++. This change also moves any #include directives within the include guard in some of the compiler/codegen/arm header files. Change-Id: I9715e2c5301699d31886e61d0fe6e29483555a2a
prof.h
|
0d92a4072c00434e95a03642a4944acf81a81cc3 |
08-Jun-2011 |
Carl Shapiro <cshapiro@google.com> |
Favor Object* over void* for the heap bitmap interfaces. Change-Id: I615dbff3e81a1128dc3ba43d6d426c370ae3abcf
prof.cpp
|
b08e2b6017770e887f6072c1520b2d7f2ef6916c |
07-Jun-2011 |
Elliott Hughes <enh@google.com> |
Switch dvmHumanReadableDescriptor over to std::string. (Prep work before making a change to stack dumps.) Change-Id: I0af49b920f450fd2611e4b96e717a637483122d6
profClass.cpp
|
60fc806b679a3655c228b4093058c59941a49cfe |
26-May-2011 |
Dan Bornstein <danfuzz@android.com> |
Further conservation of newlines. Friends don't let friends end LOG() strings with newlines. Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
prof.cpp
profOutput.cpp
|
d537d4840fcdf0e279b6a7c91a27306e0544aeaa |
26-May-2011 |
Carl Shapiro <cshapiro@google.com> |
Eliminate the dvmHeapSourceGetPtrFlag interface. This routine served answering questions about object addresses. While it was private to the garbage collector, its remaining use was inside the heap profiler. Within the heap profiler, a single path was executed to tested a pointer for containment within the zygote. In its place, a new function, dvmIsZygoteObject, has been added to the GC interface superseding the only use of dvmHeapSourceGetPtrFlag. Change-Id: I347c9adb293bd6c196bbac3765015453133dc492
profHeap.cpp
|
06f120f6092185003bc9b70e06eb44866e9676f8 |
11-May-2011 |
Carl Shapiro <cshapiro@google.com> |
Normalize declaration style. Change-Id: Iae4e3d22bc185060b3a0b4c080eafaa2ec824ac2
prof.cpp
profClass.cpp
profHeap.cpp
profOutput.cpp
profString.cpp
|
a7323974309c3b81cfe342db635d0bf30f36ff62 |
07-May-2011 |
Carl Shapiro <cshapiro@google.com> |
Establish a subclass relationships among the field types. Change-Id: Id349b359489bb6b1bbb4ab78d29d85c0e6b33799
profHeap.cpp
|
d862faa2ceae186da5518607505eb942d634ced9 |
28-Apr-2011 |
Carl Shapiro <cshapiro@google.com> |
Get rid of uneeded extern, enum, typedef and struct qualifiers. Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
prof.h
|
c6d2470eec726ae0ad95e4fd2d9d7da7cb2cdcba |
12-Apr-2011 |
Dan Bornstein <danfuzz@android.com> |
Add a class flag CLASS_ISCLASS. This flag is only turned on for the unique class Class, and it is meant to make it possible to quickly test objects for "classiness" as well as trivially figure out if one is looking at the class Class itself. Bonus: Made a few places that directly set class->accessFlags use the prescribed macro for doing same. Change-Id: I89fce708c407b597f28ce610b778123f5dcaecf6
profHeap.cpp
|
f9fa8c14c7ef87b4318d606bfc5132df7b77b17c |
09-Apr-2011 |
Carl Shapiro <cshapiro@google.com> |
Fix for loops and eliminate some other undesirable idioms. Previously, we were using a non-standard C dialect which did not permit the nicer variable scoping in loops. Now that we are using C++ in the collector we can guarantee that feature is available. This change also rearranges some of the surrounding code to take advantage of the more flexible scoping rules. Change-Id: I9be35794cc12bcbc0d5299fe387d4bc406481075
profHeap.cpp
profOutput.cpp
|
ae188c676c681e47a93ade7fdf0144099b470e03 |
08-Apr-2011 |
Carl Shapiro <cshapiro@google.com> |
Compile the garbage collector and heap profiler as C++. Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589
prof.c
prof.cpp
prof.h
profClass.c
profClass.cpp
profHeap.c
profHeap.cpp
profOutput.c
profOutput.cpp
profString.c
profString.cpp
|
ce87bfed41bbe4248b2770fb1a90f34b2518f6fa |
31-Mar-2011 |
Carl Shapiro <cshapiro@google.com> |
Delegate the queuing of cleared references to managed code. Previously, the garbage collector would pass each cleared reference to the heap worker thread for queuing. The heap worker thread would then perform a callback into managed code for each cleared reference which assigned the reference to its reference queue. With this change, the garbage collector instead links together all of the cleared references and calls back into managed code exactly once to hand off the references for processing. This change makes the heap worker thread and its data structures obsolete. Change-Id: I28e02638f0877a7fd2ac96b9c3f5597a38541ebb
prof.h
|
83ff618a3e5a63b1930ed546c3d2ef194d29d642 |
01-Feb-2011 |
Carl Shapiro <cshapiro@google.com> |
Remove the HPROF stack trace collection feature. Change-Id: I0eab9c496b07212fb2c86fe122dc422e70af891e
prof.c
prof.h
profHeap.c
profStack.c
profStack.h
profStackFrame.c
|
cf415424fda3d321aedb4f891b5373b547b02cbe |
16-Dec-2010 |
Carl Shapiro <cshapiro@google.com> |
resolved conflicts for merge of 5c398996 to dalvik-dev Change-Id: I2abd02d2840cbb74b93516bb83c604753acafd4a
|
c95738ac4e7492efeda3d6abfa25b58be2ae3981 |
15-Dec-2010 |
Carl Shapiro <cshapiro@google.com> |
Never write an hprof record for a null root. The old hprof implementation was never presented with null references but with the new visitor based implementation null references are a possibility. With this change, the root visitor short circuits after encountering a null reference and does write to the hprof file. Change-Id: I38e8808a6ea43cb4361582ada4714f20ace7bea6
prof.c
|
595b1e8db762ab2596661fd7c32c890e20c5a212 |
13-Dec-2010 |
Carl Shapiro <cshapiro@google.com> |
resolved conflicts for merge of 8a69168b to dalvik-dev Change-Id: I8f17c650f6528fddec6198097fb1abeb978b3c05
|
8a69168b0e867c26b10b7ed0440322b4cb8db834 |
13-Dec-2010 |
Carl Shapiro <cshapiro@google.com> |
Fix a bug in hprof that corrupted the root set output. The root visitor takes an Object ** but the hprof output assumed an Object *. As such, bad root set object ids were written to the hprof dump and, by extension, objects reachable only from the roots either looked like floating garbage or were wholly omitted from the output. Change-Id: I58b31b6ad145fa9843ecbda630ed8b6ab951d931
prof.c
|
fc75f3ed87b55d625b6054e18645da5cbdba31c6 |
07-Dec-2010 |
Carl Shapiro <cshapiro@google.com> |
Fix implicit conversions, rename reserved works, enable -Wc++-compat. Change-Id: I06292964a6882ea2d0c17c5c962db95e46b01543
prof.c
profOutput.c
|
5016966b91f1bc36b2bd52ec13ecfd8de1c68209 |
22-Nov-2010 |
Elliott Hughes <enh@google.com> |
Add dvmHumanReadableDescriptor function, and use it. We were abusing the fact that dvmDescriptorToDot, which is actually meant for the class loading machinery, produces more readable output than a regular descriptor. This patch adds a dvmHumanReadableDescriptor function, switches all the relevant callers over to it, and and reuses the code that was already in HprodClass.c. This means we now say "java.lang.String[]" instead of "[Ljava.lang.String;". Note that the old hprof code would have left "I" unchanged; I modified it to translate "I" to "int" (et cetera). This was probably an oversight because primitive scalars can't appear on the heap, so hprof had no need to format those types (just arrays of primitives, which it got right). Bug: 3216276 Change-Id: I63f32a2b020674dfa62ce198ff2699ec01857540
profClass.c
|
c921c8293b4bff98f87b9cd3bf6ad2ee7c44b8a7 |
30-Oct-2010 |
Carl Shapiro <cshapiro@google.com> |
Resume all threads after performing an HPROF dump. Change-Id: I83df8359a5d57e6b7cd79d75acc979024e50effb
prof.c
|
07018e2d14b012ae433a0d82025a885ed8debc3b |
27-Oct-2010 |
Carl Shapiro <cshapiro@google.com> |
Separate HPROF from the GC. In the beginning, the only way to traverse the roots and heap was to piggyback off the garbage collector. As such, HPROF was implemented by instrumenting the root- and object traversal routines to check a mode flag and call into HPROF during a GC when the flag was set. This change moves the HPROF calls out of the GC and into callbacks invoked through the visitor. Notably, it allows HPROF dumps to be computed at any point in time without invoking a GC and potentially destroying evidence relating to the cause of an OOM. Change-Id: I2b74c4f10f35af3ca33b7c0bbfe470a8b586ff66
prof.c
prof.h
|
8f192cc6bb9906849a5811ce4a9aae7cdab9a994 |
19-Oct-2010 |
Brian Carlstrom <bdc@google.com> |
Open hprof files with O_TRUNC to avoid partial overwrites of existing files Change-Id: I97a89071ad766005bb9f91661185dd901a35ae03
prof.c
|
4b851a75f7712086a9fc4427f68c99b83725f37d |
10-Jul-2010 |
Andy McFadden <fadden@android.com> |
Allow heap dump requests with a FileDescriptor arg. Part of a larger change to allow "am" to initiate hprof heap dumps. The original implementation wrote data to a temp file, because we compute the second part first while doing GC work. Now all paths work like DDMS, writing all data to a memstream and then copying it out to a file at the very end. Also, fix a potential fd leak on failure in the profiling code. Bug 2759474. Change-Id: I0f838cbd9948a23088f08463c3008be7198d76e7
prof.c
prof.h
profOutput.c
|
7365493ad8d360c1dcf9cd8b6eee62747af01cae |
09-Jun-2010 |
Carl Shapiro <cshapiro@google.com> |
Remove repeated newlines at the end of files. Change-Id: I1e3d103a7b932ef21acedb6438c0f26b315df28f
prof.c
|
de75089fb7216d19e9c22cce4dc62a49513477d3 |
09-Jun-2010 |
Carl Shapiro <cshapiro@google.com> |
Remove trailing whitespace. Change-Id: I95534bb2b88eaf48f2329282041118cd034c812b
profClass.c
profHeap.c
profStack.c
profStackFrame.c
profString.c
|
c49db8554956f8d43eb487709bc1dccfe0496ad2 |
14-May-2010 |
Barry Hayes <bhayes@google.com> |
Send unlinkedClass back to hell, as requested. The GC and Verify routines now can look inside classes better as well. Basic ideas: 1) Pre-allocate the java.lang.Class class, and explicitly set its clazz field to itself. 2) Put ClassObjects in status CLASS_IDX when their super and interface array contain Dex indexes rather than object pointers. The GC understands this, and uses that status to decide on marking those fields or not. Change-Id: Id84310b8a4ee27bf1b33e5b58ad9739fad659c4e
profHeap.c
|
03aa70ae413c6c5fb2ee4424afd30608bfb465ee |
02-Mar-2010 |
Barry Hayes <bhayes@google.com> |
Change Class layout to allocate an array of StaticField objects immediately after the ClassObject, rather than use calloc. This has the rather surprising and pleasing effect of increasing charing about 150K per zygote-launced application, as measured at start-up, after waiting and no-touching. Change-Id: I6a6c9079f946eb99111326ed45f13ecfe544e4bb
profHeap.c
|
b4bad121113179f15934d0f97a613232158bc559 |
08-Mar-2010 |
Barry Hayes <bhayes@google.com> |
Previous changes put unlinkedJavaLangClass on the heap. It makes HprofReader unhappy, because it has a NULL class. So now we won't dump objects with a NULL class. This also suppresses dumping of uninitialized objects. Change-Id: Ie6713d4e665ab6e518f13338367ee874903e2862
profHeap.c
|
98740d6436340f17f5427d5923184fcace0e38cc |
25-Feb-2010 |
Carl Shapiro <cshapiro@google.com> |
Eliminate the unused hprof "unreachable" feature. This code dates back to the Perforce repository and has never been enabled. Nobody seems to know what it was once, if ever, used for so it may as well go.
prof.h
profHeap.c
|
6343bd071555458d0cb071f2eaf15b59b36771bf |
17-Feb-2010 |
Carl Shapiro <cshapiro@google.com> |
Eliminate the heap chunk abstraction. This temporarily breaks the hprof feature that allows stack traces to be associated with objects.
profHeap.c
|
6bf992c9d51f1e12aa37fe4c791c156402a9b79b |
29-Jan-2010 |
Andy McFadden <fadden@android.com> |
Add support for streaming hprof dumps. This adds the dumpHprofDataDdms method, which generates the hprof dump in RAM and then spits the whole thing at DDMS. The idea is to avoid touching /sdcard, since not all apps have permission to do that. This rearranges hprofShutdown() a fair bit. It used to re-use a context struct, saving interesting bits to local variables before zapping it; now we just create a second context struct and free both at the end. For bug 2092855.
prof.c
prof.h
profOutput.c
|
99409883d9c4c0ffb49b070ce307bb33a9dfe9f1 |
19-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import //branches/master/...@140412
prof.c
prof.h
|
f6c387128427e121477c1b32ad35cdcaa5101ba3 |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
prof.c
prof.h
profClass.c
profHeap.c
profOutput.c
profStack.c
profStack.h
profStackFrame.c
profString.c
|
f72d5de56a522ac3be03873bdde26f23a5eeeb3c |
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
prof.c
prof.h
profClass.c
profHeap.c
profOutput.c
profStack.c
profStack.h
profStackFrame.c
profString.c
|
5d709784bbf5001012d7f25172927d46f6c1abe1 |
11-Feb-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@130745
prof.c
prof.h
profOutput.c
|
bcd637a94f10b49d18b87a74a015f9d3453ed77a |
22-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@127436
profClass.c
profStackFrame.c
|
2ad60cfc28e14ee8f0bb038720836a4696c478ad |
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
prof.c
prof.h
profClass.c
profHeap.c
profOutput.c
profStack.c
profStack.h
profStackFrame.c
profString.c
|