-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate dbg and etop to use trace sessions #8363
Migrate dbg and etop to use trace sessions #8363
Conversation
CT Test Results 6 files 211 suites 2h 0m 18s ⏱️ For more details on these failures, see this check. Results for commit 4aee35a. ♻️ 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// Erlang/OTP Github Action Bot |
How does a dbg session differ from a dbg tracer? |
Not much, except that you can have many of them. The API is not set in stone. Ideas are very welcome on how to do it. |
trace:process(Session, P, How, Flags) + | ||
trace:port(Session, P, How, Flags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will work as trace:process
will not accept *ports atoms and trace:port
will not accept *processes atoms. Maybe they should silently ignore such atoms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling trace:process(S, all, true, [ports])
works, but returns 0, so it seems to already today be ignored?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean these will currently fail:
trace:process(S, ports, ...).
trace:process(S, new_ports, ...).
trace:process(S, existing_ports, ...).
trace:port(S, processes, ...).
trace:port(S, new_processess, ...).
trace:port(S, existing_processes, ...).
4aee35a
to
90e2079
Compare
This PR moves all
dbg
functionality to use a trace session instead of relying on the global session.In addition it also adds a a new
dbg:session/1,2
API that can be used to create newdbg
session that are isolated from eachother.As a proof of concept the
etop
application has been converted to use the new sessions so that it now is possible to run multipleetop
anddbg
at the same time in a system without them interfeering with eachother.