summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/io-loop.c10
-rw-r--r--sysdep/unix/io-loop.h1
2 files changed, 7 insertions, 4 deletions
diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c
index db8556a6..b3d930cb 100644
--- a/sysdep/unix/io-loop.c
+++ b/sysdep/unix/io-loop.c
@@ -974,10 +974,10 @@ bird_thread_show(void *data)
(cs - i > fs) ? 0 : loop->time_by_sec_ns[(cs - i) % TIME_BY_SEC_SIZE]);
bptr[-1] = 0; /* Drop the trailing space */
- cli_printf(tsd->cli, -1026, " Loop %s total time: %t",
- domain_name(loop->time.domain), loop->total_time_spent_ns NS);
- cli_printf(tsd->cli, -1026, " last %d secs [ns]: %s",
- MIN(CURRENT_SEC+1, TIME_BY_SEC_SIZE), b);
+ cli_printf(tsd->cli, -1026, " Loop %s", domain_name(loop->time.domain));
+ cli_printf(tsd->cli, -1026, " Total time: %t s", loop->total_time_spent_ns NS);
+ cli_printf(tsd->cli, -1026, " Total locking time: %t s", loop->total_time_locking_ns NS);
+ cli_printf(tsd->cli, -1026, " Last %d secs [ns]: %s", MIN(CURRENT_SEC+1, TIME_BY_SEC_SIZE), b);
}
total_time_ns += loop->total_time_spent_ns;
@@ -1183,6 +1183,8 @@ birdloop_run(void *_loop)
if (locked_time > end_time)
LOOP_WARN(loop, "locked %luns after its scheduled end time", locked_time - end_time);
+ loop->total_time_locking_ns += (locked_time - start_time);
+
uint repeat, loop_runs = 0;
do {
repeat = 0;
diff --git a/sysdep/unix/io-loop.h b/sysdep/unix/io-loop.h
index b5da7aba..d60b5206 100644
--- a/sysdep/unix/io-loop.h
+++ b/sysdep/unix/io-loop.h
@@ -69,6 +69,7 @@ struct birdloop
u64 time_by_sec_ns[TIME_BY_SEC_SIZE];
u64 last_time_finished_ns;
u64 total_time_spent_ns;
+ u64 total_time_locking_ns;
};
struct bird_thread