-
Notifications
You must be signed in to change notification settings - Fork 18
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 buffer debug names #132
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
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.
The tests have some variables that can be const. Also, mock_buffer
has a method get_id
, so we don't have to hard-code the expected buffer id.
Otherwise, LGTM!
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
e58fd32
to
5f5a3a3
Compare
clang-tidy review says "All clean, LGTM! 👍" |
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.
Thanks, I've added a few minor notes.
Also please update the commit message to properly explain what this is doing.
clang-tidy review says "All clean, LGTM! 👍" |
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 looks good up to a few minor details!
One design decision that's tangentially related to this PR and that I don't like is the print_graph
member functions on task_manager
and command_graph
. These classes shouldn't concern themselves with graph printing, instead, all of that functionality should all be concentrated in print_graph
. Maybe this PR is a good opportunity to drive-by refactor this?
As far as I can see this would need a mechanism for iterating over the task buffer of a task manager, either through exposing the const task_ring_buffer&
through a getter or by becoming friends with the TDAG printing function. Let's discuss this in person!
A thought I just had: Right now the debug names are only really helpful when printing the graph, not when debugging a program itself (e.g. with GDB). This is because the names are not stored in the buffers themselves, but somewhere deep inside the runtime. We could however store a pointer to a |
d3ab85a
to
25e10e8
Compare
clang-tidy review says "All clean, LGTM! 👍" |
This adds `[set|get]_buffer_name`, which should be more significant names than just the ids. If set, these names are then included in the GraphViz output.
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
For now this only shows the buffer names plus ids instead of just ids when printing the command graph, but in a future it could also be used for instrumenting with some tracer/profiler and facilitate getting a more relevant name than just the buffer id.
Also it is the first of hopefully more debug functionalities.