From 0a9c11b64c9f99ba6bf90f22430b6794577c7aeb Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 3 Feb 2023 10:56:03 +0100 Subject: pkg/report: skip more memory allocation frames The family of such functions is big and keeps on growing. Add them to the generic skipPatterns code. --- pkg/report/linux.go | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index c3345edde..b0650339e 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -1063,10 +1063,7 @@ var linuxStackParams = &stackParams{ "warn_bogus", "__warn", "alloc_page", - "kmalloc", - "kvmalloc", - "kcalloc", - "kzalloc", + "k?v?(?:m|z|c)alloc", "krealloc", "kmem_cache", "allocate_slab", @@ -1562,8 +1559,7 @@ var linuxOopses = append([]*oops{ compile("backtrace:"), parseStackTrace, }, - skip: []string{"kmemleak", "kmalloc", "kcalloc", "kzalloc", - "vmalloc", "mmap", "kmem", "slab", "alloc", "create_object", + skip: []string{"kmemleak", "mmap", "kmem", "slab", "alloc", "create_object", "idr_get", "list_lru_init", "kasprintf", "kvasprintf", "pcpu_create", "strdup", "strndup", "memdup"}, }, @@ -1667,13 +1663,12 @@ var linuxOopses = append([]*oops{ { title: compile("WARNING: .*mm/.*\\.c.* k?.?malloc"), fmt: "WARNING: kmalloc bug in %[1]v", - stack: warningStackFmt("kmalloc", "kcalloc", "kzalloc", "krealloc", - "vmalloc", "slab", "kmem"), + stack: warningStackFmt("kmalloc", "krealloc", "slab", "kmem"), }, { title: compile("WARNING: .*mm/vmalloc.c.*__vmalloc_node"), fmt: "WARNING: zero-size vmalloc in %[1]v", - stack: warningStackFmt("vmalloc"), + stack: warningStackFmt(), }, { title: compile("WARNING: .* usb_submit_urb"), @@ -1742,8 +1737,7 @@ var linuxOopses = append([]*oops{ linuxCallTrace, parseStackTrace, }, - skip: []string{"rcu", "kmem", "slab", "kmalloc", - "vmalloc", "kcalloc", "kzalloc"}, + skip: []string{"rcu", "kmem", "slab"}, }, }, { @@ -1863,8 +1857,7 @@ var linuxOopses = append([]*oops{ linuxCallTrace, parseStackTrace, }, - skip: []string{"rcu", "kmem", "slab", "kmalloc", - "vmalloc", "kcalloc", "kzalloc"}, + skip: []string{"rcu", "kmem", "slab"}, }, }, { -- cgit mrf-deployment