Skip to content

Commit

Permalink
baseline runtime: gracefully do not log if profile path does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
bollu committed Apr 1, 2024
1 parent cbefebf commit 37c8479
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/research.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ extern "C" {
// TODO: rename into research_runtime_dump_allocator_log_at_end_of_run();
void research_dump_allocator_log() {
const char *envVarName = "RESEARCH_LEAN_RUNTIME_ALLOCATOR_LOG";
std::string out_path = std::getenv(envVarName);
const char *_envVarName = std::getenv(envVarName);
std::string out_path(_envVarName ? _envVarName : "");
if (out_path == "") { return; }

std::ofstream *of = NULL;
Expand Down

0 comments on commit 37c8479

Please sign in to comment.