Skip to content
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

Merged
merged 5 commits into from
Oct 31, 2023

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Oct 17, 2023

No description provided.

@qinsoon qinsoon requested a review from wks October 17, 2023 05:23
# 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.
Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Member Author

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>
@qinsoon
Copy link
Member Author

qinsoon commented Oct 30, 2023

Is there any other change required for the PR? @wks

Copy link
Collaborator

@wks wks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinsoon qinsoon added this pull request to the merge queue Oct 31, 2023
Merged via the queue into mmtk:master with commit 80cf0ed Oct 31, 2023
19 checks passed
@qinsoon qinsoon deleted the doc-debug-assertions branch October 31, 2023 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants