Files
fulpstation/code/_compile_options.dm
MCHSL 331365b422 Adds reference tracking (#51467)
About The Pull Request

Adds extools-powered reference tracking. Includes a couple procs that retrieve the back and forward references of a datum - Back references let you see what is referencing your object and potentially preventing it from garbage collecting, and forward ones show you what your object in turn references. Also made a cool GUI to inspect and follow these references.

The tracking adds some overhead to all variable sets and list operations. Init time is increased by ~15%. I haven't actually benched it so it might impact the actual game less.
Why It's Good For The Game

no lagging caused by hard dels scanning the entire planet (once coders fix them)
2020-06-25 11:26:59 +12:00

65 lines
2.3 KiB
Plaintext

//#define TESTING //By using the testing("message") proc you can create debug-feedback for people with this
//uncommented, but not visible in the release version)
//#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed.
// Comment this out if you are debugging problems that might be obscured by custom error handling in world/Error
#ifdef DEBUG
#define USE_CUSTOM_ERROR_HANDLER
#endif
#ifdef TESTING
#define DATUMVAR_DEBUGGING_MODE
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
//implies FIND_REF_NO_CHECK_TICK
//#define FIND_REF_NO_CHECK_TICK //Sets world.loop_checks to false and prevents find references from sleeping
//#define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
#endif
//#define REFERENCE_TRACKING //Enables extools-powered reference tracking system, letting you see what is
//referencing objects that refuse to hard delete
//#define UNIT_TESTS //Enables unit tests via TEST_RUN_PARAMETER
#ifndef PRELOAD_RSC //set to:
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
#endif // 1 to use the default behaviour;
// 2 for preloading absolutely everything;
#ifdef LOWMEMORYMODE
#define FORCE_MAP "_maps/runtimestation.json"
#endif
//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 513
#define MIN_COMPILER_BUILD 1514
#if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
#error You need version 513.1514 or higher
#endif
//Additional code for the above flags.
#ifdef TESTING
#warn compiling in TESTING mode. testing() debug messages will be visible.
#endif
#ifdef GC_FAILURE_HARD_LOOKUP
#define FIND_REF_NO_CHECK_TICK
#endif
#ifdef TRAVISBUILDING
#define UNIT_TESTS
#endif
#ifdef TRAVISTESTING
#define TESTING
#endif
// A reasonable number of maximum overlays an object needs
// If you think you need more, rethink it
#define MAX_ATOM_OVERLAYS 100