projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
722cf83
)
tools: funclatency use atomic_increment
author
chenyuezhou
<zcy.chenyue.zhou@gmail.com>
Mon, 21 Jun 2021 14:07:30 +0000
(10:07 -0400)
committer
yonghong-song
<ys114321@gmail.com>
Tue, 22 Jun 2021 06:28:53 +0000
(23:28 -0700)
tools/funclatency.py
patch
|
blob
|
history
diff --git
a/tools/funclatency.py
b/tools/funclatency.py
index 6a067e0c57c0b35aac53a88266c7affb40c74454..aad879d1b5ba6e8c3a31934b67efd575ec4fceb3 100755
(executable)
--- a/
tools/funclatency.py
+++ b/
tools/funclatency.py
@@
-143,10
+143,8
@@
int trace_func_return(struct pt_regs *ctx)
u32 lat = 0;
u32 cnt = 1;
- u64 *sum = avg.lookup(&lat);
- if (sum) lock_xadd(sum, delta);
- u64 *cnts = avg.lookup(&cnt);
- if (cnts) lock_xadd(cnts, 1);
+ avg.atomic_increment(lat, delta);
+ avg.atomic_increment(cnt);
FACTOR