mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-23 21:00:31 +02:00
CI builds the profiling flavour too (tools/ci_build.py linux profile: a debug build with configure.py --profile), so a change that breaks it is seen; nothing else compiles it. profile_sections.h, which only the port's builds use, moves from source/cseries to port/linux/include, and the hooks in the game's sources (the map load, the console, the main loop's exit) and their includes say they are the port's. The build scripts' import lines are wrapped as the files' others.
34 lines
1.0 KiB
C
34 lines
1.0 KiB
C
/*
|
|
PROFILE_SECTIONS.H
|
|
|
|
The profiling build's CPU sections around the game's steps (configure.py
|
|
--profile, port/linux/src/profile_trace.c): in a normal build each wraps
|
|
its statement and leaves nothing else.
|
|
*/
|
|
|
|
#ifndef __PROFILE_SECTIONS_H
|
|
#define __PROFILE_SECTIONS_H
|
|
|
|
#ifdef HALO_PROFILE
|
|
|
|
#include "cseries/profile.h"
|
|
|
|
/* these macros leave no tokens in a normal build: call sites have no trailing
|
|
semicolon. a call site may be an unbraced if-branch: in a normal build
|
|
profile_scope is the statement alone. */
|
|
#define PROFILE_SECTION(variable, name) static struct profile_section variable = { name, NONE, TRUE };
|
|
#define profile_scope_enter(variable) profile_enter(variable)
|
|
#define profile_scope_exit(variable) profile_exit(variable)
|
|
#define profile_scope(variable, statement) { profile_enter(variable) statement profile_exit(variable) }
|
|
|
|
#else
|
|
|
|
#define PROFILE_SECTION(variable, name)
|
|
#define profile_scope_enter(variable)
|
|
#define profile_scope_exit(variable)
|
|
#define profile_scope(variable, statement) statement
|
|
|
|
#endif
|
|
|
|
#endif
|