bcc/BPF_TABLE can be atomically cleanup?
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
When i processed `./funclatency.py '/home/zcy/test/a.out:test_func' -Tui 1`. I found that the number of times the function was counted was not the same as the number of times it was executed
```
for (i = 0; i < 1000000; i++)
test_func();
```
```
./funclatency.py '/home/zcy/test/a.out:test_func' -Tui 1
Tracing 1 functions for "/home/zcy/test/a.out:test_func"... Hit Ctrl-C to end.
19:00:55
19:00:56
Function = test_func [60802]
usecs : count distribution
0 -> 1 : 102733 |****************************************|
2 -> 3 : 134 | |
4 -> 7 : 346 | |
8 -> 15 : 15 | |
16 -> 31 : 77 | |
32 -> 63 : 64 | |
64 -> 127 : 44 | |
128 -> 255 : 14 | |
256 -> 511 : 1 | |
avg = 1 usecs, total: 146898 usecs, count: 103428
19:00:58
Function = test_func [60802]
usecs : count distribution
0 -> 1 : 398470 |****************************************|
2 -> 3 : 554 | |
4 -> 7 : 1588 | |
8 -> 15 : 108 | |
16 -> 31 : 301 | |
32 -> 63 : 219 | |
64 -> 127 : 151 | |
128 -> 255 : 51 | |
256 -> 511 : 6 | |
avg = 1 usecs, total: 561911 usecs, count: 396896
19:00:59
Function = test_func [60802]
usecs : count distribution
0 -> 1 : 379875 |****************************************|
2 -> 3 : 579 | |
4 -> 7 : 1465 | |
8 -> 15 : 67 | |
16 -> 31 : 309 | |
32 -> 63 : 226 | |
64 -> 127 : 145 | |
128 -> 255 : 60 | |
256 -> 511 : 5 | |
avg = 1 usecs, total: 539264 usecs, count: 378027
19:01:00
19:01:01
```
```
103428+396896+378027 != 1000000
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported command with funclatency.py and the provided million-call test. Inspect how BPF_TABLE data is cleaned up and counted between output intervals; done means determining why the reported counts differ from executions and establishing atomic cleanup or documenting the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux, python
- Domain
- observability, operating-systems, performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100