aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2010-11-22 16:08:32 +0100
committerBjörn-Egil Dahlberg <[email protected]>2010-11-22 16:08:32 +0100
commita5da41e6addc7aa84c1aa2af151d7f13d3d657e2 (patch)
treea79ba2941d88ae109942dcd95d323e9a9c1ea64e /lib/tools/src
parent8404e1da17e0dfb8d14a21171803f757fac79883 (diff)
downloadotp-a5da41e6addc7aa84c1aa2af151d7f13d3d657e2.tar.gz
otp-a5da41e6addc7aa84c1aa2af151d7f13d3d657e2.tar.bz2
otp-a5da41e6addc7aa84c1aa2af151d7f13d3d657e2.zip
Fix eprof API mismatch of sort functionality
Option {sort, calls} now sorts on calls. Option {sort, time } now sorts on time.
Diffstat (limited to 'lib/tools/src')
-rw-r--r--lib/tools/src/eprof.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tools/src/eprof.erl b/lib/tools/src/eprof.erl
index f7c1b76364..8e5c0ec46b 100644
--- a/lib/tools/src/eprof.erl
+++ b/lib/tools/src/eprof.erl
@@ -415,15 +415,15 @@ sort_mfa(Bpfs, mfa) when is_list(Bpfs) ->
end, Bpfs);
sort_mfa(Bpfs, time) when is_list(Bpfs) ->
lists:sort(fun
- ({_,{A,_}}, {_,{B,_}}) when A < B -> true;
+ ({_,{_,A}}, {_,{_,B}}) when A < B -> true;
(_, _) -> false
end, Bpfs);
sort_mfa(Bpfs, calls) when is_list(Bpfs) ->
lists:sort(fun
- ({_,{_,A}}, {_,{_,B}}) when A < B -> true;
+ ({_,{A,_}}, {_,{B,_}}) when A < B -> true;
(_, _) -> false
end, Bpfs);
-sort_mfa(Bpfs, _) when is_list(Bpfs) -> sort_mfa(Bpfs, calls).
+sort_mfa(Bpfs, _) when is_list(Bpfs) -> sort_mfa(Bpfs, time).
filter_mfa(Bpfs, Ts) when is_list(Ts) ->
filter_mfa(Bpfs, [], proplists:get_value(calls, Ts, 0), proplists:get_value(time, Ts, 0));