global depths = 0; global timing probe process.mark("import__find__load__start") { modname = user_string($arg1); now = local_clock_ns() timing[tid(), depths] = now printf("[%ld] %*s* Importing '%s' ...\n", now, 2*depths, "", modname); depths++; } probe process.mark("import__find__load__done") { modname = user_string($arg1); found = $arg2; depths--; now = local_clock_ns() dur = now - timing[tid(), depths] if (found) printf("[%ld] %*s+ Imported '%s' in %ldus\n", local_clock_ns(), 2*depths, "", modname, dur/1000); else printf("[%ld] %*s- Failed '%s' in %ldus\n", local_clock_ns(), 2*depths, "", modname, dur/1000); }