From a20d8897ec75aabaf77d2824e492b2643f24bb5b Mon Sep 17 00:00:00 2001 From: xiaosuGW Date: Wed, 11 Aug 2021 14:53:12 -0500 Subject: [PATCH] printf meet deadline or miss deadline when a sandbox is complete --- runtime/include/sandbox_functions.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runtime/include/sandbox_functions.h b/runtime/include/sandbox_functions.h index 23a5ec3..b3179d2 100644 --- a/runtime/include/sandbox_functions.h +++ b/runtime/include/sandbox_functions.h @@ -215,6 +215,16 @@ sandbox_mem_print_perf(struct sandbox *sandbox) uint32_t blocked_us = sandbox->blocked_duration / runtime_processor_speed_MHz; uint32_t returned_us = sandbox->returned_duration / runtime_processor_speed_MHz; + if (sandbox->module->next_module == NULL) { + uint32_t now = __getcycles(); + bool miss_deadline = now > sandbox->absolute_deadline ? true : false; + if (miss_deadline) { + mem_log("%lu miss deadline\n", sandbox->id); + } else { + mem_log("%lu meet deadline\n", sandbox->id); + } + } + /* * Assumption: A sandbox is never able to free pages. If linear memory management * becomes more intelligent, then peak linear memory size needs to be tracked