Skip to content

Commit

Permalink
bpflbr: Trim LBR entries when exit mode
Browse files Browse the repository at this point in the history
When the trace target is bpf prog, trim LBR entries when `--mode` is
`exit`, as no bpf prog's entries when `--mode` is `entry`.

Signed-off-by: Leon Hwang <[email protected]>
  • Loading branch information
Asphaltt committed Dec 6, 2024
1 parent 6d0ca91 commit c52f367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/bpflbr/lbr.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func getLbrStack(event *Event, progs *bpfProgs, addr2line *Addr2Line, ksyms *Kal

entries = entries[nrSkip:]

if isProg {
if isProg && mode == TracingModeExit {
for i := range entries {
if progInfo.contains(entries[i].From) || progInfo.contains(entries[i].To) {
entries = entries[i:]
Expand Down

0 comments on commit c52f367

Please sign in to comment.