unpoison when releasing arena
This commit is contained in:
parent
6704980693
commit
179a6c3588
22
build.c
22
build.c
@ -38,7 +38,6 @@ Bool IsDirty(D_Tag tag)
|
|||||||
* Step
|
* Step
|
||||||
* ========================== */
|
* ========================== */
|
||||||
|
|
||||||
|
|
||||||
typedef struct Step Step;
|
typedef struct Step Step;
|
||||||
typedef struct StepList StepList;
|
typedef struct StepList StepList;
|
||||||
|
|
||||||
@ -313,8 +312,6 @@ void BuildStepMsvcCompileCommand(Step *s)
|
|||||||
|
|
||||||
void OnBuild(StringList cli_args)
|
void OnBuild(StringList cli_args)
|
||||||
{
|
{
|
||||||
OS_TimeStamp start = OS_GetTimeStamp();
|
|
||||||
|
|
||||||
arena = ArenaAlloc(Gigabyte(64));
|
arena = ArenaAlloc(Gigabyte(64));
|
||||||
store = D_StoreAlloc();
|
store = D_StoreAlloc();
|
||||||
worker_shared = ArenaPush(&arena, WorkerSharedState);
|
worker_shared = ArenaPush(&arena, WorkerSharedState);
|
||||||
@ -395,11 +392,11 @@ void OnBuild(StringList cli_args)
|
|||||||
OS_CreateDirAtAbsPath(out_bin_dir_path);
|
OS_CreateDirAtAbsPath(out_bin_dir_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
SH_Print(Lit("------------------------------\n"));
|
|
||||||
SH_Print(Lit("Power Play build\n"));
|
|
||||||
{
|
{
|
||||||
|
SH_Print(Lit("------------------------------\n"));
|
||||||
String compiler = { 0 };
|
String compiler = { 0 };
|
||||||
String compiler_loc = { 0 };
|
String compiler_loc = { 0 };
|
||||||
|
{
|
||||||
SH_CommandResult where_res = { 0 };
|
SH_CommandResult where_res = { 0 };
|
||||||
if (arg_msvc) {
|
if (arg_msvc) {
|
||||||
compiler = Lit("Msvc");
|
compiler = Lit("Msvc");
|
||||||
@ -409,13 +406,15 @@ void OnBuild(StringList cli_args)
|
|||||||
where_res = SH_RunCommandCaptureOutput(&arena, Lit("where clang.exe"), true);
|
where_res = SH_RunCommandCaptureOutput(&arena, Lit("where clang.exe"), true);
|
||||||
}
|
}
|
||||||
compiler_loc = where_res.error ? Lit("Not found") : StringReplace(&arena, where_res.output, Lit("\n"), Lit(""));
|
compiler_loc = where_res.error ? Lit("Not found") : StringReplace(&arena, where_res.output, Lit("\n"), Lit(""));
|
||||||
SH_PrintF(Lit("[Compiler: %F] (%F)\n"), FmtStr(compiler), FmtStr(compiler_loc));
|
|
||||||
}
|
}
|
||||||
|
SH_PrintF(Lit("Compiler path: %F\n"), FmtStr(compiler_loc));
|
||||||
|
SH_PrintF(Lit("Build path: \"%F\"\n"), FmtStr(out_bin_dir_path));
|
||||||
|
SH_PrintF(Lit("[%F]\n"), FmtStr(compiler));
|
||||||
if (arg_asan) SH_Print(Lit("[Asan Enabled]\n"));
|
if (arg_asan) SH_Print(Lit("[Asan Enabled]\n"));
|
||||||
if (arg_profiling) SH_Print(Lit("[Profiling]\n"));
|
if (arg_profiling) SH_Print(Lit("[Profiling]\n"));
|
||||||
if (arg_developer) SH_Print(Lit("[Developer build]\n"));
|
if (arg_developer) SH_Print(Lit("[Developer build]\n"));
|
||||||
SH_PrintF(Lit("Building to \"%F\"\n"), FmtStr(out_bin_dir_path));
|
|
||||||
SH_Print(Lit("------------------------------\n\n"));
|
SH_Print(Lit("------------------------------\n\n"));
|
||||||
|
}
|
||||||
|
|
||||||
/* ========================== *
|
/* ========================== *
|
||||||
* Constants
|
* Constants
|
||||||
@ -613,7 +612,7 @@ void OnBuild(StringList cli_args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ========================== *
|
/* ========================== *
|
||||||
* Generate root dependencies
|
* Examine build hash
|
||||||
* ========================== */
|
* ========================== */
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -636,7 +635,7 @@ void OnBuild(StringList cli_args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (build_hash != old_build_hash) {
|
if (build_hash != old_build_hash) {
|
||||||
SH_Print(Lit("Builder exe or build args have changed, rebuilding all.\n"));
|
SH_Print(Lit("Builder exe or build args have changed, forcing complete rebuild.\n"));
|
||||||
force_rebuild = true;
|
force_rebuild = true;
|
||||||
String data = StringFromStruct(&build_hash);
|
String data = StringFromStruct(&build_hash);
|
||||||
D_ClearWrite(build_hash_file, data);
|
D_ClearWrite(build_hash_file, data);
|
||||||
@ -913,7 +912,6 @@ void OnBuild(StringList cli_args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ========================== *
|
/* ========================== *
|
||||||
* Build step: Link
|
* Build step: Link
|
||||||
* ========================== */
|
* ========================== */
|
||||||
@ -1026,10 +1024,6 @@ void OnBuild(StringList cli_args)
|
|||||||
|
|
||||||
D_WriteStoreToHistFile(&store, hist_path);
|
D_WriteStoreToHistFile(&store, hist_path);
|
||||||
|
|
||||||
OS_TimeStamp end = OS_GetTimeStamp();
|
|
||||||
F64 seconds = OS_SecondsFromTimeStamp(end - start);
|
|
||||||
SH_PrintF(Lit("Finished in %F seconds\n"), FmtF64P(seconds, 5));
|
|
||||||
|
|
||||||
ShutdownWorkers();
|
ShutdownWorkers();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
@ -46,6 +46,7 @@ void arena_release(struct arena *arena)
|
|||||||
{
|
{
|
||||||
__prof;
|
__prof;
|
||||||
__proffree(arena->base);
|
__proffree(arena->base);
|
||||||
|
ASAN_UNPOISON(arena->base, arena->committed);
|
||||||
sys_memory_release(arena->base);
|
sys_memory_release(arena->base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user