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

[Diagnostics] RAM usage diagnostic sources #1411

Merged
merged 2 commits into from
Nov 1, 2017

Conversation

avtolstoy
Copy link
Member

@avtolstoy avtolstoy commented Oct 23, 2017

submission notes
**Important:** Please sanitize/remove any confidential info like usernames, passwords, org names, product names/ids, access tokens, client ids/secrets, or anything else you don't wish to share.

Please Read and Sign the Contributor License Agreement ([Info here](https://github.com/spark/firmware/blob/develop/CONTRIBUTING.md)).

You may also delete this submission notes header if you'd like. Thank you for contributing!

NOTE: This PR targets feature/diagnostics-merge branch

Solution

This PR adds the following diagnostic sources:

  • Total RAM: ID 25, Type: scalar(32)
    • Total amount of RAM available on the device in bytes. This value normally equals the size of the region shared by the heap and user application static RAM. Does not include static RAM in use by the system parts.
  • Used RAM: ID 26, Type: scalar(32)
    • Amount of RAM used out of "Total RAM" (user application static RAM + heap used).

Steps to Test

  • d command in listening mode

Example App

N/A

References

  • [CH8737]

Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

- total_heap
- total_init_heap
- max_used_heap
- user_static_ram
- DIAG_ID_SYSTEM_TOTAL_RAM = 25, // sys:tram
- DIAG_ID_SYSTEM_USED_RAM = 26, // sys:uram
@pkourany
Copy link
Contributor

@avtolstoy, what is missing is a "largest allocatable chuck" tool which could be an indicator for the amount of fragmentation in the heap.

@m-mcgowan m-mcgowan self-requested a review October 31, 2017 16:45
@m-mcgowan m-mcgowan added this to the 0.8.0 milestone Oct 31, 2017
@m-mcgowan m-mcgowan merged commit 8783d28 into feature/diagnostics-merge Nov 1, 2017
@sergeuz sergeuz modified the milestones: 0.8.0, 0.10.0 Feb 2, 2018
@mrlambchop mrlambchop deleted the feature/diag-ram-usage branch October 26, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants