Skip to content

ci(bloat): make a slim ESP32-S3 profile reproducible and visible in reports #4564

Closed

Description

@zackees

Context

At 0811ca88af (PR #4563), a fresh bash bloat esp32s3 --example Blink --build --top 25 produces 374,588 B of attributed flash and 459,560 B of firmware flash. Its 60 compile_commands.json entries contain neither -DNDEBUG nor -DFASTLED_LOG_VERBOSITY=0. src/fl/log/log.h therefore selects verbosity 1, while docs/SLIM_ESP32S3.md describes verbosity 0 as the release default. The report still attributes 58,771 B of read-only data to the ClocklessIdf5<WS2812> constructor's transitive string pool (the constructor code itself is only 348 B).

The same default Blink image contains 8,017 B of libespcoredump.a flash symbols, diag_log_add (1,596 B), and Arduino printBeforeSetupInfo() (1,180 B). The repo already ships opt-in flags and tools/sdkconfig_for_smallest_fastled.defaults, plus a manual multi-config script. The CI bloat gate measures only the ordinary fbuild image, so the slim configuration is neither easy to reproduce with the current wrapper nor protected by a CI size check.

Proposal

Add an explicit fbuild-backed slim profile to the bash bloat esp32s3 --build workflow, reusing the existing logging and SDK knobs. Record the effective logging define, SDK configuration/profile, board, example, and toolchain next to each symbol report. Build the ordinary and slim profiles from the same commit and add a focused CI smoke check for the slim profile. Keep the existing default-image baseline separate so its history remains interpretable.

Verify what the prebuilt Arduino/ESP-IDF framework actually honors: the produced ELF must prove that the selected knobs took effect. If a requested SDK setting cannot be applied by fbuild, the profile should fail clearly rather than report a misleading slim result.

Acceptance criteria

  • RED reproduction records the current Blink build's missing logging define and retained 58,771 B string attribution; a focused profile test fails because no effective slim profile is reported.
  • GREEN build records FASTLED_LOG_VERBOSITY=0 as effective, removes the logging string pool, and proves the selected SDK diagnostic/coredump knobs through absent linked symbols or an explicit unsupported-setting error.
  • Same-commit ordinary/slim reports include attributed and whole-firmware flash deltas, with build provenance sufficient to reproduce both.
  • A CI smoke check exercises the explicit slim profile without changing the ordinary bloat ratchet or silently changing normal sketch behavior.

Decisions

  • P2: the current report is valid for its build flags, but its release path is easily mistaken for the documented log-off release configuration.
  • Put the profile/report integration in FastLED's ci/bloat.py, compile wrapper, and bloat workflow; use fbuild only through the repository's bash wrappers.
  • Make slim mode explicit because disabling logs and crash diagnostics changes field-debug behavior.

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions