-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add a section about debugging tips in user guide #987
Conversation
# Debugging Tips | ||
|
||
In this section, we offer insights into debugging strategies tailored for identifying issues | ||
in a binding implementation. Our emphasis is on the unique debugging tools and methods in MMTk. |
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'm not sure I follow. Is this section about debugging tools that MMTk provides? Or general debugging tools/tips when working on an MMTk port? If it's the latter, then tracing (using eBPF) and rr
should be mentioned. If the former, then tracing should still be mentioned since it is also an excellent debugging tool.
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.
This section is about anything that is specific to MMTk and could be useful in debugging. For example, we probably won't discuss how to use rr
or gdb
in general, but if MMTk has functions that can be good breakpoints for rr
or gdb
, this is a good place to tell people about it.
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.
But I would be more liberal about what we include here. For example, the eBPF tracing tools are not specific to MMTk, (Perfetteo is also not specific to MMTk, either), but that combination is very effective in debugging performance bottlenecks in the work packet system. I think we can include anything we find useful for debugging MMTk. rr
, for example, is a very useful tool, because conventional logging and breakpoints are not very effective when debugging GC bugs. And not everyone know rr
. It doesn't seem to be as well-known as GDB. I would prefer including rr
somewhere in our documentation.
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.
eBPF and perfetto matches what I said. We provides tracepoints that the users should know about, and we provides scripts to produce traces that need perfetto to view. It is a good example of things that we should include in our guide.
About rr
, we do not want to provide a tutorial on how to use rr
. But we could provide discussion and examples about how to use rr
for certain scenarios in MMTk, like how to trace each step in a transitive closure, etc.
I will rephrase the paragraph to make it clear what the 'debugging tips' section is about. But I don't plan to add other discussions in this PR.
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 have made some changes to this paragraph.
Co-authored-by: Kunshan Wang <wks1986@gmail.com>
Co-authored-by: Kunshan Wang <wks1986@gmail.com>
Is there any other change required for the PR? @wks |
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.
LGTM
No description provided.