szuncover
Uncover your threads stack usage. Working only with GCC, using the .ci files generated by the -callgraph-info=cu,da options to construct a callgraph with stack-usages.
Installation and Usage
Install with pip:
pip install szuncover
Create a config listing your thread entry functions:
{ "threads": [
{
"thread_entry_name": "bg_thread_main",
"stack_size": 1024
},
{
"thread_entry_name": "gs_usb_tx_thread",
"stack_size": 1024
},
{
"thread_entry_name": "gs_usb_rx_thread",
"stack_size": 1024
},
{
"thread_entry_name": "log_process_thread_func",
"stack_size": 768
}
]}
then build your firmware with -callgraph-info=cu,da and run szuncover --build_dir ./build/ --config_file config.json for some basic output:
┌──────────────────────────────────────────────────────────────────────────────┐
│ bg_thread_main - ( 68.0%) 696/ 1024 │█████████████-------│
│ gs_usb_tx_thread - ( 68.8%) 704/ 1024 │█████████████-------│
│ gs_usb_rx_thread - ( 60.2%) 616/ 1024 │████████████--------│
│ log_process_thread_func - ( 34.4%) 264/ 768 │██████--------------│
└──────────────────────────────────────────────────────────────────────────────┘
WARNING: Given calltree info may limit this analysis:
* number of functions with unresolved calls in thread:
* bg_thread_main: 22 resulting in 34 missing calls in the calltree
* gs_usb_tx_thread: 4 resulting in 5 missing calls in the calltree
* gs_usb_rx_thread: 2 resulting in 2 missing calls in the calltree
* log_process_thread_func: 3 resulting in 4 missing calls in the calltree
* number of functions with missing stacksize in calltree:
* bg_thread_main : 29
* gs_usb_tx_thread : 4
* gs_usb_rx_thread : 0
* log_process_thread_func : 2
Running Tests
python -m unittest
Metadata
Release files for szuncover 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| szuncover-0.1.1.tar.gz | 6.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| szuncover-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.7 kB
Release files / szuncover-0.1.1.tar.gz
| Download URL | szuncover-0.1.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d2deac1070c612bcccba4d3af8e4f46ba5fee6e97c0c6825f92fd40fbcf8f93
|
|
BLAKE2b-256 checksum How to use checksums |
72e2ae86fe127c23a81ebf58f40144b651504cde355764857ea2171b4f8a5a3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.11
|
Release files / szuncover-0.1.1-py3-none-any.whl
| Download URL | szuncover-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2022d02f0a3d9beeff7dabf9d8434f4738ff82c6b764bd3d55656bc73bb311c
|
|
BLAKE2b-256 checksum How to use checksums |
ff13d5799010470accf7944f737aedc823f405c03c2a42e002396be624a40a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.11
|
Security for szuncover 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.