The default Release build (-O3 -DNDEBUG) omits frame pointers and ships no DWARF, so it can't be line-annotated or unwound; build-debug (-O0) profiles unoptimized code. Add a dedicated profiling variant for C++ hot-path work (validating #331/#342/#343/#344). - CMakeLists.txt: MCRF_PROFILE option adds -fno-omit-frame-pointer on top of RelWithDebInfo (-O2 -g). Binary not stripped. Post-build lib/assets/scripts copy already keys on the mcrogueface target, so build-profile/ self-populates. - Makefile: `make profile` (-> build-profile/), `make callgrind SCRIPT=...` (one-shot Callgrind on a headless benchmark), `make clean-profile` (wired into clean-all). - docs/profiling.md: full Callgrind + perf workflow, incl. the one-time `sudo sysctl kernel.perf_event_paranoid=1` perf needs on this box. - Pointers from the Makefile header and CLAUDE.md build section. Verified: DWARF sections present, frame-pointer prologues emitted, headless smoke test passes, Callgrind yields source line + call-count attribution, and perf --call-graph fp resolves engine symbols. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cookbook | ||
| stubs | ||
| templates | ||
| tutorials | ||
| api-audit-2026-04.md | ||
| api-stability.md | ||
| api_reference_complete.html | ||
| API_REFERENCE_COMPLETE.md | ||
| api_reference_dynamic.html | ||
| API_REFERENCE_DYNAMIC.md | ||
| EMSCRIPTEN_RESEARCH.md | ||
| ISSUE_TRIAGE_2026-04.md | ||
| mcrfpy.3 | ||
| PROCEDURAL_GENERATION_SPEC.md | ||
| profiling.md | ||
| threading-model.md | ||
| WASM_TROUBLESHOOTING.md | ||