Enabled execution profiling for Cortex-R5 (#766)

The Cortex-R5 assembly guarded its execution-profile hooks with only the legacy
TX_ENABLE_EXECUTION_CHANGE_NOTIFY symbol. The documented
TX_EXECUTION_PROFILE_ENABLE configuration initialized profiling without recording
thread or interrupt transitions.

I made all AC5, AC6, GNU, Green Hills, and IAR hooks accept both symbols. I also
extended the port consistency and GNU/LLVM feature checks to cover the current
configuration.

All 849 base assembly files and all 219 TX_EXECUTION_PROFILE_ENABLE files passed
with GCC 14.2.1 and clang 22.1.0. A CMake/Ninja Cortex-R5 profile build emitted
all seven expected hook relocations. Proprietary toolchains were not run.

Assisted-by: Codex (GPT-5) <noreply@openai.com>
This commit is contained in:
Frédéric Desbiens
2026-09-28 12:45:09 -04:00
committed by GitHub
parent c3bf5e6db5
commit 990faf670d
36 changed files with 160 additions and 104 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ declare -A PORT_TARGET=(
# Baseline, where the 16-bit POP takes r0-r7 and pc only, and rejected by GNU as
# well as by LLVM. Turning the feature on had never once been tried.
FEATURE_MACROS="TX_ENABLE_VFP_SUPPORT TX_ENABLE_FIQ_SUPPORT TX_LOW_POWER
TX_ENABLE_EXECUTION_CHANGE_NOTIFY"
TX_ENABLE_EXECUTION_CHANGE_NOTIFY TX_EXECUTION_PROFILE_ENABLE"
# TX_ENABLE_IRQ_NESTING and TX_ENABLE_FIQ_NESTING are deliberately not here.
# They guard no assembly in the trees this script walks: the nesting start and end
+1 -1
View File
@@ -242,7 +242,7 @@ declare -A PORT_TARGET=(
# months after the identical fix landed in its non-module sibling, because no
# glob in either script reached ports_module until #672.
FEATURE_MACROS="TX_ENABLE_VFP_SUPPORT TX_ENABLE_FIQ_SUPPORT TX_LOW_POWER
TX_ENABLE_EXECUTION_CHANGE_NOTIFY"
TX_ENABLE_EXECUTION_CHANGE_NOTIFY TX_EXECUTION_PROFILE_ENABLE"
# TX_ENABLE_IRQ_NESTING and TX_ENABLE_FIQ_NESTING are deliberately not here.
# They guard no assembly in the trees this script walks: the nesting start and
+24 -1
View File
@@ -251,7 +251,30 @@ done < <(find ports ports_arch ports_module ports_smp -name "*.s" -type f \
[ "$lowercase" -eq 0 ] && say " ok: no .s file under a gnu tree uses the preprocessor"
# --------------------------------------------------------------------------
# 5. Report only: families with no copy script.
# 5. Cortex-R5 execution-profile guards accept both configuration names.
# --------------------------------------------------------------------------
# Profiling storage uses TX_EXECUTION_PROFILE_ENABLE, while
# TX_ENABLE_EXECUTION_CHANGE_NOTIFY remains a supported compatibility symbol.
# Every Cortex-R5 profiling hook must recognize both symbols.
say ""
say "== Cortex-R5 execution-profile guards accept both symbols =="
profile_guards_missing=0
while IFS=: read -r file line text; do
case "$text" in
*TX_EXECUTION_PROFILE_ENABLE*) ;;
*)
fail "$file:$line accepts the legacy execution-profile symbol only"
profile_guards_missing=$((profile_guards_missing + 1))
;;
esac
done < <(grep -Rn "TX_ENABLE_EXECUTION_CHANGE_NOTIFY" ports/cortex_r5/*/src 2>/dev/null)
[ "$profile_guards_missing" -eq 0 ] && \
say " ok: every Cortex-R5 profiling hook accepts both symbols"
# --------------------------------------------------------------------------
# 6. Report only: families with no copy script.
# --------------------------------------------------------------------------
# These are maintained by hand, so a fix applied to one toolchain can silently
# miss the others. Nothing here fails the run; it is a prompt to look.