Skip to content

Commit 4520859

Browse files
committed
Fix links to types
1 parent 99a8000 commit 4520859

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

src/tr.erl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@
6969
%%
7070
%% Record fields:
7171
%% <ul>
72-
%% <li>`index' - `t:index()'</li>
73-
%% <li>`pid' - process in which the traced event occurred, `t:erlang:pid()'</li>
72+
%% <li>`index' - {@link index()}</li>
73+
%% <li>`pid' - process in which the traced event occurred, {@link erlang:pid()}</li>
7474
%% <li>`event' - `call', `return' or `exception' for function traces; `send' or `recv' for messages.</li>
75-
%% <li>`mfa' - `t:erlang:mfa()' for function traces; `no_mfa' for messages.</li>
75+
%% <li>`mfa' - {@link erlang:mfa()} for function traces; `no_mfa' for messages.</li>
7676
%% <li>`data' - Argument list (for calls), returned value (for returns) or class and value (for exceptions).</li>
7777
%% <li>`ts' - Timestamp in microseconds.</li>
78-
%% <li>`info' - For `send' events it is a `t:recipient()' tuple; otherwise `no_info'.</li>
78+
%% <li>`info' - For `send' events it is a {@link recipient()} tuple; otherwise `no_info'.</li>
7979
%% </ul>
8080

8181
-type pred(T) :: fun((T) -> boolean()).
@@ -93,7 +93,7 @@
9393
-type own_time() :: non_neg_integer(). % Total own time (without other called functions).
9494
-type pids() :: [pid()] | all. % A list of processes to trace. Default: `all'.
9595
-type limit() :: pos_integer() | infinity. % Maximum number of items.
96-
-type index() :: pos_integer(). % Unique, auto-incremented identifier of a `t:tr()' record.
96+
-type index() :: pos_integer(). % Unique, auto-incremented identifier of a {@link tr()} record.
9797
-type table() :: atom(). % ETS table name.
9898
-type mfargs() :: {module(), atom(), list()}. % Module, function and arguments.
9999

@@ -221,8 +221,8 @@
221221
%% <li>`module' - module name</li>
222222
%% <li>`function' - function name</li>
223223
%% <li>`args' - argument list</li>
224-
%% <li>`children' - a list of child nodes, each of them being `t:tree()'</li>
225-
%% <li>`result' - return value or exception, `t:result()'</li>
224+
%% <li>`children' - a list of child nodes, each of them being {@link tree()}</li>
225+
%% <li>`result' - return value or exception, {@link result()}</li>
226226
%% </ul>
227227

228228
-type tree_item() :: {acc_time(), call_tree_count(), tree()}.
@@ -360,13 +360,13 @@ select(F, DataVal) ->
360360
filter(F) ->
361361
filter(F, tab()).
362362

363-
%% @doc Returns matching traces from `t:tr_source()'.
363+
%% @doc Returns matching traces from {@link tr_source()}.
364364
-spec filter(pred(tr()), tr_source()) -> [tr()].
365365
filter(F, Tab) ->
366366
Traces = foldl(fun(Tr, State) -> filter_trace(F, Tr, State) end, [], Tab),
367367
lists:reverse(Traces).
368368

369-
%% @doc Returns traceback of the first matching trace from `t:tr_source()'.
369+
%% @doc Returns traceback of the first matching trace from {@link tr_source()}.
370370
%%
371371
%% Matching can be done with a predicate function, an index value or a `tr' record.
372372
%% Fails if no trace is matched.
@@ -376,7 +376,7 @@ filter(F, Tab) ->
376376
traceback(Pred) ->
377377
traceback(Pred, #{}).
378378

379-
%% @doc Returns traceback of the first matching trace from `t:tr_source()'.
379+
%% @doc Returns traceback of the first matching trace from {@link tr_source()}.
380380
%%
381381
%% Fails if no trace is matched.
382382
%% The options `limit' and `format' do not apply.
@@ -396,7 +396,7 @@ traceback(PredF, Options) when is_function(PredF, 1) ->
396396
tracebacks(PredF) ->
397397
tracebacks(PredF, #{}).
398398

399-
%% @doc Returns tracebacks of all matching traces from `t:tr_source()'.
399+
%% @doc Returns tracebacks of all matching traces from {@link tr_source()}.
400400
-spec tracebacks(pred(tr()), tb_options()) -> [[tr()]] | [tb_tree()].
401401
tracebacks(PredF, Options) when is_map(Options) ->
402402
Tab = maps:get(tab, Options, tab()),
@@ -410,27 +410,27 @@ tracebacks(PredF, Options) when is_map(Options) ->
410410
foldl(fun(T, State) -> tb_step(PredF, T, State) end, InitialState, Tab),
411411
finalize_tracebacks(TBs, Output, Format, Options).
412412

413-
%% @doc Returns the root call of each `t:tb_tree()' from the provided list.
413+
%% @doc Returns the root call of each {@link tb_tree()} from the provided list.
414414
-spec roots([tb_tree()]) -> [tr()].
415415
roots(Trees) ->
416416
lists:map(fun root/1, Trees).
417417

418-
%% @doc Returns the root call of the provided `t:tb_tree()'.
418+
%% @doc Returns the root call of the provided {@link tb_tree()}.
419419
-spec root(tb_tree()) -> tr().
420420
root(#tr{} = T) -> T;
421421
root({#tr{} = T, _}) -> T.
422422

423423
%% @doc Returns a list of traces from `tab()' between the first matched call and the corresponding return.
424424
%%
425-
%% Matching can be done with a predicate function, an index value or a `t:tr()' record.
425+
%% Matching can be done with a predicate function, an index value or a {@link tr()} record.
426426
%% Fails if no trace is matched.
427427
%%
428428
%% @see range/2
429429
-spec range(pred(tr()) | index() | tr()) -> [tr()].
430430
range(PredF) ->
431431
range(PredF, #{}).
432432

433-
%% @doc Returns a list of traces from `t:tr_source()' between the first matched call and the corresponding return.
433+
%% @doc Returns a list of traces from {@link tr_source()} between the first matched call and the corresponding return.
434434
%%
435435
%% Fails if no call is matched.
436436
-spec range(pred(tr()) | index() | tr(), range_options()) -> [tr()].
@@ -448,7 +448,7 @@ range(PredF, Options) when is_function(PredF, 1) ->
448448
ranges(PredF) ->
449449
ranges(PredF, #{}).
450450

451-
%% @doc Returns lists of traces from `t:tr_source()' between matched calls and corresponding returns.
451+
%% @doc Returns lists of traces from {@link tr_source()} between matched calls and corresponding returns.
452452
-spec ranges(pred(tr()), range_options()) -> [[tr()]].
453453
ranges(PredF, Options) when is_map(Options) ->
454454
Tab = maps:get(tab, Options, tab()),
@@ -469,7 +469,7 @@ incomplete_ranges(#{pid_states := States}, Output) when Output =:= all; Output =
469469

470470
%% @doc Prints sorted call time statistics for the selected traces from `tab()'.
471471
%%
472-
%% The statistics are sorted according to `t:acc_time()', descending.
472+
%% The statistics are sorted according to {@link acc_time()}, descending.
473473
%% Only top `Limit' rows are printed.
474474
%% @see sorted_call_stat/1
475475
-spec print_sorted_call_stat(selector(_), limit()) -> ok.
@@ -478,7 +478,7 @@ print_sorted_call_stat(KeyF, Limit) ->
478478

479479
%% @doc Returns sorted call time statistics for the selected traces from `tab()'.
480480
%%
481-
%% The statistics are sorted according to `t:acc_time()', descending.
481+
%% The statistics are sorted according to {@link acc_time()}, descending.
482482
%% @see call_stat/1
483483
-spec sorted_call_stat(selector(Key)) -> [{Key, call_count(), acc_time(), own_time()}].
484484
sorted_call_stat(KeyF) ->
@@ -491,7 +491,7 @@ sorted_call_stat(KeyF) ->
491491
call_stat(KeyF) ->
492492
call_stat(KeyF, tab()).
493493

494-
%% @doc Returns call time statistics for traces selected from `t:tr_source()'.
494+
%% @doc Returns call time statistics for traces selected from {@link tr_source()}.
495495
%%
496496
%% Calls are aggregated by `Key' returned by `KeyF'.
497497
-spec call_stat(selector(Key), tr_source()) -> #{Key => {call_count(), acc_time(), own_time()}}.
@@ -544,14 +544,14 @@ match_val(Pred, Val) ->
544544
contains_val(DataVal, Data) ->
545545
match_val(fun(Val) -> Val =:= DataVal end, Data).
546546

547-
%% @doc Executes the function call for the provided `t:tr()' record or index.
547+
%% @doc Executes the function call for the provided {@link tr()} record or index.
548548
-spec do(tr()) -> term().
549549
do(Index) when is_integer(Index) ->
550550
do(lookup(Index));
551551
do(#tr{event = call, mfa = {M, F, Arity}, data = Args}) when length(Args) =:= Arity ->
552552
apply(M, F, Args).
553553

554-
%% @doc Returns the `t:tr()' record from `tab()' for an index.
554+
%% @doc Returns the {@link tr()} record from `tab()' for an index.
555555
-spec lookup(index()) -> tr().
556556
lookup(Index) when is_integer(Index) ->
557557
[T] = ets:lookup(tab(), Index),

0 commit comments

Comments
 (0)