Skip to content
Permalink
Browse files
Broadening recon_trace:calls/2 to allow >1 tspec
Only calls/3 allowed for more than one trace specification to be used,
creating a somewhat inconsistent API between with and without options.

This patch makes sure that multiple specs are allowed in both calls/2
and calls/3 for a more consistent interface, and is backwards compatible
(a superset) of the currently existing interface.
  • Loading branch information
ferd committed Apr 2, 2014
1 parent 984f6c5 commit e858493d620deb5f155d83c0be406e38c8ad665d
Showing 2 changed files with 6 additions and 2 deletions.
@@ -30,6 +30,8 @@ all stable changes of the first version of Recon.
- 2.2.0 Upcoming (master branch, still in development):
- Adding scheduler info metrics to get a more accurate picture than what
top and CPU gives.
- Broadening `recon_trace:calls/2` interface to allow multiple match specs,
which was currently only allowed for `calls/3`.
- 2.1.2:
- Fixing tests for R15B02 and up
- Fixing a backwards compatibility for R15B03 on `recon_alloc` operations
@@ -201,9 +201,11 @@ clear() ->
ok.

%% @equiv calls({Mod, Fun, Args}, Max, [])
-spec calls(tspec(), max()) -> num_matches().
-spec calls(tspec() | [tspec(),...], max()) -> num_matches().
calls({Mod, Fun, Args}, Max) ->
calls([{Mod,Fun,Args}], Max, []).
calls([{Mod,Fun,Args}], Max, []);
calls(TSpecs = [_|_], Max) ->
calls(TSpecs, Max, []).

%% @doc Allows to set trace patterns and pid specifications to trace
%% function calls.

0 comments on commit e858493

Please sign in to comment.