diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-18 11:34:25 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-29 14:53:56 +0000 |
| commit | 337657e0d5b5c120b163c09fbcfc49ae5897cb39 (patch) | |
| tree | a2bdadb6f1b18fe9b8dbbc50f6b90cc6fffa8f9a /pkg/mgrconfig | |
| parent | 941b178ab29efd12da4f3df83e5a6b78088a689c (diff) | |
pkg/mgrconfig: add HasCovFilter helper
To reduce diff in the next change.
Diffstat (limited to 'pkg/mgrconfig')
| -rw-r--r-- | pkg/mgrconfig/load.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go index 4a5febf79..cfe26c573 100644 --- a/pkg/mgrconfig/load.go +++ b/pkg/mgrconfig/load.go @@ -220,6 +220,10 @@ func checkNonEmpty(fields ...string) error { return nil } +func (cfg *Config) HasCovFilter() bool { + return len(cfg.CovFilter.Functions)+len(cfg.CovFilter.Files)+len(cfg.CovFilter.RawPCs) != 0 +} + func (cfg *Config) CompleteKernelDirs() { cfg.KernelObj = osutil.Abs(cfg.KernelObj) if cfg.KernelSrc == "" { |
