crates/nornir-build-thing/src/kconfig/profile.config
# nordisk PROFILE overlay — merged when `profile_run = true`, and ONLY then.
#
# This is the instrument for design §4's RUN loop: the one thing that can say
# what a WORKLOAD actually executed. It is not a size knife and it is not free —
# CONFIG_FUNCTION_TRACER instruments every function's entry, which costs both
# text and time. A kernel built with this is a MEASURING kernel, never a
# shipping one, and nothing in the tree ships it.
#
# Why it exists at all: LTO and dead-code elimination are STATIC. They drop what
# can never be called. They know nothing about what your appliance actually ran
# in its first ten seconds, and the symbols nothing touched are exactly the ones
# worth asking about. ftrace's function profiler answers that, and no config
# analysis can.
# ── the profiler ───────────────────────────────────────────────────────────
# FUNCTION_PROFILER gives /sys/kernel/tracing/trace_stat/function<N>: one line
# per function with a HIT COUNT, which is the whole measurement.
CONFIG_FTRACE=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_PROFILER=y
# ── where the counters are read from ───────────────────────────────────────
# tracefs is mounted by PID 1 at /sys/kernel/tracing; DEBUG_FS is kept because
# the older /sys/kernel/debug/tracing path is what most documentation names and
# a fallback that exists is cheaper than a boot that fails on a path.
CONFIG_DEBUG_FS=y