Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
hprof generation, not writing the first record
Browse files Browse the repository at this point in the history
We miss some roots since the first record isn't initialized.

Change-Id: I50c80a701a4ee142c52602b9015f6e93be54da9f
  • Loading branch information
Johan Erlandsson authored and jredestig committed Jul 2, 2012
1 parent 7798a61 commit 4769b51
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vm/hprof/Hprof.cpp
Expand Up @@ -246,6 +246,8 @@ int hprofDumpHeap(const char* fileName, int fd, bool directToDdms)
if (ctx == NULL) {
return -1;
}
// first record
hprofStartNewRecord(ctx, HPROF_TAG_HEAP_DUMP_SEGMENT, HPROF_TIME);
dvmVisitRoots(hprofRootVisitor, ctx);
dvmHeapBitmapWalk(dvmHeapSourceGetLiveBits(), hprofBitmapCallback, ctx);
hprofFinishHeapDump(ctx);
Expand Down

0 comments on commit 4769b51

Please sign in to comment.