Commit 9481133e authored by Hejing Li's avatar Hejing Li Committed by Antoine Kaufmann
Browse files

sims/net_switch: add more info to SIGUSR1 debug prints

besides main time, print in and out timestamp for the ports' underlying SimBricks interfaces
parent 385c0e83
......@@ -290,6 +290,15 @@ static void sigint_handler(int dummy) {
static void sigusr1_handler(int dummy) {
fprintf(stderr, "main_time = %lu\n", cur_ts);
size_t n = ports.size();
for (size_t i = 0; i < n; i++) {
NetPort *p = ports[i];
uint64_t in_timestamp = p->netif_.base.in_timestamp;
uint64_t out_timestamp = p->netif_.base.out_timestamp;
fprintf(stderr, "[Port %lu ]: in_timestamp == %lu\n", i, in_timestamp);
fprintf(stderr, "[Port %lu ]: out_timestamp == %lu\n", i, out_timestamp);
}
}
#ifdef NETSWITCH_STAT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment