allow multiple sessions in ad-hoc `tprof:profile/2`
π
The goal of this PR is to allow running multiple tprof:profile/2 at the same time without fear of overlap.
I need to:
- [ ] add tests
- [ ] update these docs
I'm targeting master instead of maint because I did that in https://github.com/erlang/otp/pull/9648 and this PR kind of requires that other one ...
CT Test Results
ββ2 filesβββ22 suitesβββ5m 22s β±οΈ 227 testsβ222 β β5 π€β0 β 253 runsββ248 β β5 π€β0 β
Results for commit 7cfc68ec.
:recycle: This comment has been updated with latest results.
To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.
See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.
Artifacts
- Complete CT logs (Download Logs)
- HTML Documentation (Download HTML Docs)
- No Windows Installer found
// Erlang/OTP Github Action Bot
The goal of this PR is to allow running multiple tprof:profile/2 at the same time without fear of overlap.
What's the "fear"? Maybe I'm missing something, but the code seems to work fine today. tprof:profile will spawn an unregistered server that creates a new trace session. The name passed to trace:session_create does not need to be unique. Several trace sessions with the same name can exists without interfering each other.
π
~~The current approach might be working fine because session option was no-op: https://github.com/erlang/otp/pull/9648 -- but it still ended up always being tprof ...~~
Seems like I misunderstood my own change in https://github.com/erlang/otp/pull/9648 :) I'll limit the changes in this PR just to the docs.
Thank you!
Good.
This paragraph in the tprof docs does not seem correct:
By default, only one ad-hoc or server-aided profiling session is allowed at any point in time. It is possible to force multiple ad-hoc sessions concurrently, but it is the responsibility of the developer to ensure that trace patterns do not overlap: