-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Make standalone heap tracing more usefull and easy to read and analyse (IDFGH-12836) #13803
Comments
Hello @masterxq, thanks for submitting this feature request. It is perfectly fine to use I will keep you updated about the solution I will choose to implement. |
i agree it makes sense |
Hi @masterxq, |
Very fast, very cool and very useful! I will try to honor the work invested and give it a test by using the new feature as soon as possible to create a bug report that is as qualitative as possible for me. Can it also be merged into 4.4.x? Please remember to trigger an update of the documentation, so users have the chance to use it, a good espressif with few bugs is good for everybody ^^ Thank you! |
@masterxq, |
This commit adds a feature to pause the heap tracing in the sense that in this state, the heap tracing will no longer record the new allocations but will continue to monitor the free() in order to keep track of the status of the allocations present in the list of records. See #13803
Understand, thank you very much! Best Regards! |
Is your feature request related to a problem?
tracing down memory leaks currently works like this:
Now you will see a lot of allocated memory leaks that are false positive. And will be freed soon.
This can be avoided with a some small changes to heap trace api.
Describe the solution you'd like.
As already mentioned many of the false positive will be freed soon and we don't want to see them.
This can be solved if it is possible only to stop tracing malloc and continue tracing free. Then it would be possible to wait longer or restart some services. So many of the false positive leaks will now be freed and new mallocs will not be collected. Now we have a more relevant output of the dump.
Now we should have much less false positives...
The standard workflow would still work, and it should be easily possible without breaking changes.
Describe alternatives you've considered.
Even better would be if this workflow would also be possible, so we better know when or with which action stuff will be freed.
Additional context.
I think this would help a lot to make good bug reports about memory leaks without complicated JTAG setup, what really can be hard to setup in products where the problem appears.
After all this could help to fix a lot of memory leaks, by helping users by helping.
I think espressif has a lot of good developer tests, but also a lot of bugs that only appears in production, and there it is hard to analyze for the users, and it is hard to define test cases for the espressif team. So it is important to make the tests that works without special equipment in production as good as possible. This allows users to make tests in the final environment.
Additionally, it would help the user to find leaks in user code. Without have tons of false positives from the framework that will be freed the next few seconds :)
Thanks for reading :)
The text was updated successfully, but these errors were encountered: