Skip to content

Commit 576b6e2

Browse files
committed
kernel: Fix trace call_memory specs and docs
1 parent 93667e1 commit 576b6e2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/kernel/src/trace.erl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@ being destroyed when the last strong handle is garbage collected.
208208
{meta, module(), term() } |
209209
{meta_match_spec, trace_match_spec() | false | undefined} |
210210
{call_count, non_neg_integer() | boolean() | undefined} |
211-
{call_time | call_memory, [{pid(), non_neg_integer(),
212-
non_neg_integer(), non_neg_integer()}] | boolean() | undefined}.
211+
{call_time, [{pid(), non_neg_integer(), non_neg_integer(), non_neg_integer()}]
212+
| boolean() | undefined} |
213+
{call_memory, [{pid(), non_neg_integer(), non_neg_integer()}]
214+
| boolean() | undefined}.
213215

214216
-type trace_info_return() ::
215217
undefined |
@@ -870,6 +872,9 @@ Argument **`FlagList`** is a list of options. The following are the valid option
870872

871873
- **`call_memory`**{: #call_memory } - Start (`MatchSpec == true`) or stop
872874
(`MatchSpec == false`) call memory tracing for all types of function calls.
875+
For every function, a counter is incremented when the function is called and
876+
the memory consumed by the function is measured and accumulated in another
877+
counter. Separate counters are stored for each call traced process.
873878

874879
If call memory tracing is started while already running, counters and
875880
allocations restart from zero. To pause running counters, use

0 commit comments

Comments
 (0)