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

Blank traces when allocated memory is used up #6

Open
sudara opened this issue Dec 12, 2022 · 3 comments
Open

Blank traces when allocated memory is used up #6

sudara opened this issue Dec 12, 2022 · 3 comments

Comments

@sudara
Copy link
Owner

sudara commented Dec 12, 2022

If you have perfetto enabled and run the program too long, it eats through all of peretto's allocated memory.

There's no warning, just the .pftrace file ends up not loading (blank screen) when you got to import it at the trace viewer at https://perfetto.dev

I haven't looked into perfetto proper to see if there's a way to change this behavior.

Perhaps there's a supported way that we could cleanly end the trace when the memory is used.

Or maybe there's API that we could periodically query to at least warn the user via DBG or something that the trace is corrupted.

Or maybe this is a bug with perfetto?

@sudara sudara mentioned this issue Dec 12, 2022
3 tasks
@benthevining
Copy link
Collaborator

It seems to me that this is a Perfetto bug, but if you'd like me to I can spend some time looking into it.

@sudara
Copy link
Owner Author

sudara commented Dec 13, 2022

It seems like the expected default behavior is the buffer should be a ring buffer https://github.com/google/perfetto/blob/2b1f16731730196ee2c5c55ef2c481dba27da56b/docs/concepts/config.md?plain=1#LL112C3-L112C14

This sounds like a similar description of the problem:
google/perfetto#231 (comment)

Could switch to the discard policy by default, I guess. Odd that the default behavior is to brick the trace entirely...

@sudara
Copy link
Owner Author

sudara commented Jul 15, 2023

Right now this max's out at 105MB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants