Skip to content

Commit

Permalink
fixup! Crash dump viewer: ignore allocator type from blocks size keys
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Oct 30, 2024
1 parent 55e5250 commit 444d868
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/observer/src/crashdump_viewer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,7 @@ sort_type_data(Type,[{Key0,Val0}|Data],Acc,DoTotal) ->
case lists:member(Key,?interesting_allocator_info) of
true ->
Val = list_to_integer(hd(Val0)),
sort_type_data(Type,Data,update_value(Key0,Val,Acc),DoTotal);
sort_type_data(Type,Data,update_value(Key,Val,Acc),DoTotal);
false ->
sort_type_data(Type,Data,Acc,DoTotal)
end;
Expand Down
8 changes: 5 additions & 3 deletions lib/observer/test/crashdump_viewer_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +739,12 @@ lookat_all_nodes([#nod{channel=Channel0}|Nodes]) ->
lookat_alloc_info([AllocSummary|_]) ->
{"Allocator Summary",
["blocks size", "carriers size", "mseg carriers size"],
[{"total", [BSTotal, CSTotal, _MsegTotal]}|_]
Data
} = AllocSummary,
true = (BSTotal =/= "N/A"),
true = (CSTotal =/= "N/A"),

%% All values must be integer.
_ = [list_to_integer(IntStr) || {_,[_,_,_]=L} <- Data, IntStr <- L],

ok.

%%%-----------------------------------------------------------------
Expand Down

0 comments on commit 444d868

Please sign in to comment.