Skip to content

Commit 139c3aa

Browse files
committed
tools: Correct tprof session concurrency docs
Each ad-hoc profile already uses an isolated trace session, so profiles can run concurrently without changing one another's trace settings. Remove the unsupported registered option example and document how multiple server-aided profilers are started. Signed-off-by: ruslandoga <ruslandoga+gh@icloud.com>
1 parent 20bea2d commit 139c3aa

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

lib/tools/src/tprof.erl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,11 @@ the developer to take care of such processes.
287287
9> tprof:profile(timer, sleep, [100000], #{timeout => 1000}).
288288
```
289289

290-
By default, only one ad-hoc or server-aided profiling session is
291-
allowed at any point in time. It is possible to force multiple ad-hoc
292-
sessions concurrently, but it is the responsibility of the developer
293-
to ensure that trace patterns do not overlap:
294-
295-
```erlang
296-
1> tprof:profile(fun() -> lists:seq(1, 32) end,
297-
#{registered => false, pattern => [{lists, '_', '_'}]}).
298-
```
290+
Each ad-hoc profile runs in an isolated trace session, so multiple ad-hoc
291+
profiles can run concurrently without changing one another's trace settings.
292+
Ad-hoc profiles can also run alongside server-aided profilers. To run multiple
293+
server-aided profilers, start them with the `session` option described in
294+
[`start/1`](`start/1`).
299295
300296
## Server-aided profiling
301297

0 commit comments

Comments
 (0)