Skip to content
Permalink
Browse files
Merge pull request #36 from garazdawi/lukas/fix_gc_printouts
Fix gc_* trace message information
  • Loading branch information
ferd committed Nov 23, 2015
2 parents 59589b7 + 4284a66 commit 8913f36f12d6040307aa75f596bbf9ad3f6888a3
Showing 1 changed file with 7 additions and 4 deletions.
@@ -540,14 +540,17 @@ format(TraceMsg) ->
%% {trace, Pid, gc_start, Info}
{gc_start, [Info]} ->
HeapSize = proplists:get_value(heap_size, Info),
{"gc beginning -- heap ~p bytes", [HeapSize]};
OldHeapSize = proplists:get_value(old_heap_size, Info),
MbufSize = proplists:get_value(mbuf_size, Info),
{"gc beginning -- heap ~p bytes",
[HeapSize + OldHeapSize + MbufSize]};
%% {trace, Pid, gc_end, Info}
{gc_end, [Info]} ->
[Info] = TraceInfo,
HeapSize = proplists:get_value(heap_size, Info),
OldHeapSize = proplists:get_value(old_heap_size, Info),
{"gc finished -- heap ~p bytes (recovered ~p bytes)",
[HeapSize, OldHeapSize-HeapSize]};
MbufSize = proplists:get_value(mbuf_size, Info),
{"gc finished -- heap ~p bytes",
[HeapSize + OldHeapSize + MbufSize]};
_ ->
{"unknown trace type ~p -- ~p", [Type, TraceInfo]}
end,

0 comments on commit 8913f36

Please sign in to comment.