From d2bc0fc06e458fc97430a1fe256da86875b5b52b Mon Sep 17 00:00:00 2001 From: Recolic K <bensl@microsoft.com> Date: Wed, 15 Jun 2022 14:14:43 +0800 Subject: [PATCH] m --- autorun.cmd | 2 ++ winmonmon.cc | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 autorun.cmd diff --git a/autorun.cmd b/autorun.cmd new file mode 100644 index 0000000..76953ad --- /dev/null +++ b/autorun.cmd @@ -0,0 +1,2 @@ +schtasks.exe /create /tn "monmonboot" /ru SYSTEM /Sc ONSTART /RL HIGHEST /tr "%~dp0\wmonmon.exe --role recorder --db db.log" /F +schtasks.exe /run /tn "monmonboot" diff --git a/winmonmon.cc b/winmonmon.cc index 66bf6bd..c54a00c 100755 --- a/winmonmon.cc +++ b/winmonmon.cc @@ -20,7 +20,9 @@ static_assert(sizeof(round_record_t) == sizeof(uint64_t)); #ifndef NO_RECORDER inline void writeback_record(fd_t fd, const round_record_t &rr) { +#ifdef DEBUG rlib::printfln("DEBUG: writing record time_offset={}, stat counts= {} {} {}", rr.time_offset, (int)rr.stats_count[0], (int)rr.stats_count[1], (int)rr.stats_count[2]); +#endif rlib::fdIO::writen_ex(fd, &rr, sizeof(rr)); } -- GitLab