Commit 8cdcb0da authored by muahao's avatar muahao Committed by yonghong-song

[tools/syscount.py]: fix total_ns wrong count (#1931)

It's useful to know each syscall's total latency
in that period, but not the latency of the last time
in that period.
Signed-off-by: default avatarAhao Mu <muahao@linux.alibaba.com>
parent 49d475f1
......@@ -481,7 +481,7 @@ TRACEPOINT_PROBE(raw_syscalls, sys_exit) {
val = data.lookup_or_init(&key, &zero);
val->count++;
val->total_ns = bpf_ktime_get_ns() - *start_ns;
val->total_ns += bpf_ktime_get_ns() - *start_ns;
#else
u64 *val, zero = 0;
val = data.lookup_or_init(&key, &zero);
......
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