원클릭으로
dftracer-annotate-cpp
C++ annotation rules for dftracer — RAII guard, REGION macros for main, UPDATE usage, and quick checklist
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
C++ annotation rules for dftracer — RAII guard, REGION macros for main, UPDATE usage, and quick checklist
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Communication-component (MPI/collective/network) bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline
Compute-component bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline
Key literature, bottleneck-to-optimization mappings, and strategies for the dftracer I/O optimization pipeline
Memory-component bottleneck-to-optimization mappings, papers, and L1/L2/L3 strategies for the dftracer optimization pipeline
VPIC-Kokkos-specific knowledge: build/annotation quirks, the two-stage deck-compile pattern, deck sizing for smoke vs validation runs, and the measured MPI-communication-bound diagnosis on Tuolumne. Load this skill whenever working with vpic-kokkos (github.com/lanl/vpic-kokkos).
Install and build dftracer into the session using the MCP install tool and record tool pitfalls early.
| name | dftracer-annotate-cpp |
| description | C++ annotation rules for dftracer — RAII guard, REGION macros for main, UPDATE usage, and quick checklist |
Add the include after all existing #include lines in the .cpp file (never in a header):
#include <dftracer/dftracer.h>
Regular C++ functions — use the RAII scope guard (no manual END needed):
void my_function(const char *path) {
DFTRACER_CPP_FUNCTION(); // RAII — END called automatically when scope exits
DFTRACER_CPP_FUNCTION_UPDATE("path", path);
...
// No explicit END needed
}
DFTRACER_CPP_FUNCTION() must be the first statement after the opening {.C++ main — use DFTRACER_CPP_REGION_START/END instead of DFTRACER_CPP_FUNCTION(),
because the RAII destructor fires after DFTRACER_CPP_FINI(), which is wrong:
int main(int argc, char **argv) {
DFTRACER_CPP_INIT(nullptr, nullptr, nullptr);
DFTRACER_CPP_REGION_START(main_region); // ← REGION, not FUNCTION
...
if (error) {
DFTRACER_CPP_REGION_END(main_region); // ← close region first
DFTRACER_CPP_FINI(); // ← then shut down tracer
return 1;
}
...
DFTRACER_CPP_REGION_END(main_region); // ← close region before normal return
DFTRACER_CPP_FINI();
return 0;
}
main_region) can be any valid C identifier.DFTRACER_C_REGION_START / DFTRACER_C_REGION_END.DFTRACER_CPP_REGION_*. Use DFTRACER_CPP_FUNCTION().DFTRACER_CPP_REGION_START/END.void my_write(const char *path, size_t size) {
DFTRACER_CPP_FUNCTION();
DFTRACER_CPP_FUNCTION_UPDATE("path", path); // string params only
...
}
DFTRACER_CPP_FUNCTION_UPDATE("name", value) for string (const char *) params.path, filename, name, dir, mode.#include <dftracer/dftracer.h> added to .cpp files only (never headers)DFTRACER_CPP_FUNCTION() as first statement after {DFTRACER_CPP_INIT → DFTRACER_CPP_REGION_START → ... → DFTRACER_CPP_REGION_END → DFTRACER_CPP_FINI → returnDFTRACER_C_*) in C++ files