aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/report/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-07 09:35:45 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-07 10:40:55 +0200
commite419f4e6d851d09202e550ac2a5975ef68fd6935 (patch)
treec7c2163f8900a97e11cd225f4d1dc89fe7cf98f1 /pkg/report/linux.go
parent3f3be050c02a1f1846fa30ca337e711c16e300f9 (diff)
pkg/report: consider on_each_cpu as stall anchor function
Kernel frequently hangs in on_each_cpu, it seems to be more indicative of the root cause than subsequent frames.
Diffstat (limited to 'pkg/report/linux.go')
-rw-r--r--pkg/report/linux.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index b24d9ae42..d66350bd2 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -590,6 +590,13 @@ 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") {
+ // 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"
+ }
for _, prefix := range []string{
"__x64_",
"SYSC_",
@@ -716,6 +723,7 @@ var linuxStallAnchorFrames = []*regexp.Regexp{
compile("__fput"),
compile("task_work_run"),
compile("exit_to_usermode"),
+ compile("on_each_cpu"),
}
// nolint: lll