Skip to main content

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for szuncover 0.1.0
File Size Uploaded Provenance
szuncover-0.1.0.tar.gz 6.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for szuncover 0.1.0
File Interpreter ABI Platform
szuncover-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / szuncover-0.1.0.tar.gz

Download URL szuncover-0.1.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2ff4a6198909010ebc5f1e0533fc342a51fcafa67860fd6c73212bb73df14b69
BLAKE2b-256 checksum
How to use checksums
974e67966d0055cec0689faab74ae3b0a3c5815b363b87228ec05749607370a5
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.0-py3-none-any.whl

Download URL szuncover-0.1.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0cd411b0dfbcd6c509468f60bf59407663e26527afc3e85288cc5c0f0c45d5ae
BLAKE2b-256 checksum
How to use checksums
3b4407f9cecb7004d6bb7aba537d5c8849ba7743f58bfce89d7935f749473015
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.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page