- add -dumpjit command line parameter that dumps the JIT log for all functions to dumpjit.txt

This commit is contained in:
Magnus Norddahl 2018-10-10 06:17:35 +02:00
commit 01825231ec
5 changed files with 79 additions and 10 deletions

View file

@ -66,6 +66,8 @@
#include "types.h"
#include "m_argv.h"
void JitDumpLog(FILE *file, VMScriptFunction *func);
// [SO] Just the way Randy said to do it :)
// [RH] Made this CVAR_SERVERINFO
CVAR (Int, infighting, 0, CVAR_SERVERINFO)
@ -824,6 +826,15 @@ void SetDehParams(FState *state, int codepointer)
}
fclose(dump);
}
if (Args->CheckParm("-dumpjit"))
{
FILE *dump = fopen("dumpjit.txt", "a");
if (dump != nullptr)
{
JitDumpLog(dump, sfunc);
}
fclose(dump);
}
}
}