From 08fc4ef14dba2f94415f292691af61af28b71195 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 7 Jul 2020 12:04:22 +0200 Subject: pkg/report: make smp_call_function anchor instead of on_each_cpu Right after committing the on_each_cpu change, another report come in where smp_call_function is not called from on_each_cpu. And there are actually more such callers in code, and also as existing tests show. smp_call_function seems to be the better root cause indication. --- pkg/report/linux.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index d66350bd2..b480651f1 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -590,12 +590,10 @@ func linuxStallFrameExtractor(frames []string) (string, string) { prev := frames[0] for _, frame := range frames { if matchesAny([]byte(frame), linuxStallAnchorFrames) { - if strings.HasPrefix(frame, "on_each_cpu") { + if strings.Contains(frame, "smp_call_function") { // In this case we want this function rather than the previous one // (there can be several variations on the next one). - // This one can also be called "on_each_cpu_cond", - // normalize it to "on_each_cpu". - prev = "on_each_cpu" + prev = "smp_call_function" } for _, prefix := range []string{ "__x64_", @@ -723,7 +721,7 @@ var linuxStallAnchorFrames = []*regexp.Regexp{ compile("__fput"), compile("task_work_run"), compile("exit_to_usermode"), - compile("on_each_cpu"), + compile("smp_call_function"), } // nolint: lll -- cgit mrf-deployment