Don't create perf map files in linux unless enabled

This commit is contained in:
Megamouse 2024-04-20 17:48:35 +02:00
parent 16f006362e
commit b4d5b44e00

View file

@ -19,6 +19,7 @@ LOG_CHANNEL(jit_log, "JIT");
void jit_announce(uptr func, usz size, std::string_view name) void jit_announce(uptr func, usz size, std::string_view name)
{ {
#ifdef __linux__ #ifdef __linux__
#if 0
static const struct tmp_perf_map static const struct tmp_perf_map
{ {
std::string name{fmt::format("/tmp/perf-%d.map", getpid())}; std::string name{fmt::format("/tmp/perf-%d.map", getpid())};
@ -44,6 +45,7 @@ void jit_announce(uptr func, usz size, std::string_view name)
fs::remove_file(s_map.name); fs::remove_file(s_map.name);
return; return;
} }
#endif
#endif #endif
if (!size) if (!size)