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

Capturing internal state for debug investigations #72

Closed
kvark opened this issue Feb 23, 2019 · 4 comments
Closed

Capturing internal state for debug investigations #72

kvark opened this issue Feb 23, 2019 · 4 comments
Labels
help required We need community help to make this happen. type: enhancement New feature or request

Comments

@kvark
Copy link
Member

kvark commented Feb 23, 2019

We need to introduce some infrastructure of capturing the internal state, so that we can have a closer look at things when stuff goes out of the expected way. Most interesting things:

  • metadata of all of the resources (by desriptors we pass at creation?)
  • state of resource trackers on all the things: devices, command buffers, passes
  • references from all around the world: other resources, trackers, active submissions

From this, we could go a step further and ask the capture about what are all the things connected to a single node (e.g. a texture), to get an idea of how it's referenced and transitioned. This could possibly be done off-line, as an extra analysis based on the captured data.

@kvark kvark added type: enhancement New feature or request help required We need community help to make this happen. labels Feb 23, 2019
@seivan
Copy link
Contributor

seivan commented Feb 26, 2019

Does this mean of adding a Derive Debug for Adapters, Device, Pipelines etc?
Because I'd love to be able to print something and see its state/fields. Useful for learning purposes.

@kvark
Copy link
Member Author

kvark commented Feb 26, 2019

No, it means adding Serialize to structs that can be serialized, and introducing their serializable analogues for the ones that can't. We have a similar scheme implemented in WebRender, e.g. https://github.com/servo/webrender/blob/b4b0f52cba955fac9cad2e6e42c88aef65923974/webrender/src/render_backend.rs#L65-L66 , and it has shown to work exceptionally well for debugging. You can read more about it here - http://kvark.github.io/webrender/debug/ron/2018/01/23/wr-capture-infra.html

@cwfitzgerald
Copy link
Member

Seems to have been solved by api tracing.

@kvark
Copy link
Member Author

kvark commented Dec 1, 2020

The issue is about a different debugging feature, more like what WebRender has. But I think it's fine to close this as API tracing helps with most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants