Skip to content

Commit

Permalink
Remove duplicate funcs from --filter-non-skb-funcs
Browse files Browse the repository at this point in the history
Signed-off-by: Zhichuan Liang <gray.liang@isovalent.com>
  • Loading branch information
jschwinger233 authored and brb committed Apr 24, 2024
1 parent 5c2c5b3 commit 0257005
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/pwru/types.go
Expand Up @@ -7,6 +7,7 @@ package pwru
import (
"fmt"
"os"
"slices"
"strings"

flag "github.com/spf13/pflag"
Expand Down Expand Up @@ -102,6 +103,8 @@ func (f *Flags) Parse() {
f.FilterPcap = strings.Join(flag.Args(), " ")
if len(f.FilterNonSkbFuncs) > 0 {
f.FilterTrackSkbByStackid = true
slices.Sort(f.FilterNonSkbFuncs)
f.FilterNonSkbFuncs = slices.Compact(f.FilterNonSkbFuncs)
}
}

Expand Down

0 comments on commit 0257005

Please sign in to comment.