Skip to content

Commit

Permalink
move snapshots to beginning of file
Browse files Browse the repository at this point in the history
this way we can stream out the snapshots every time
we GC and then free their memory, then later just finish
it up with the string heap, types, and static frames.
  • Loading branch information
timo committed Sep 5, 2017
1 parent 6063981 commit acbbde0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/profiler/heapsnapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,12 +1042,12 @@ void collection_to_filehandle(MVMThreadContext *tc, MVMHeapSnapshotCollection *c
HeapDumpIndex index = {0};
fputs("MoarHeapDumpv002", fh);

snapshots_to_filehandle(tc, col, fh, &index);

string_heap_to_filehandle(tc, col, fh, &index);
types_to_filehandle(tc, col, fh, &index);
static_frames_to_filehandle(tc, col, fh, &index);

snapshots_to_filehandle(tc, col, fh, &index);

index_to_filehandle(tc, col, fh, &index);

MVM_free(index.snapshot_sizes);
Expand Down

0 comments on commit acbbde0

Please sign in to comment.