Skip to content
Permalink
Browse files
Fix gc_* trace message information
  • Loading branch information
garazdawi committed Nov 23, 2015
1 parent 59589b7 commit 4284a6683da3153c1b7751d552432b4e7ee295d3
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 4284a66

Please sign in to comment.