perf-core-use-vma_is_initial_stack-and-vma_is_initial_heap.patch removed from -mm tree
The quilt patch titled
Subject: perf/core: use vma_is_initial_stack() and vma_is_initial_heap()
has been removed from the -mm tree. Its filename was
perf-core-use-vma_is_initial_stack-and-vma_is_initial_heap.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Kefeng Wang <[email protected]>
Subject: perf/core: use vma_is_initial_stack() and vma_is_initial_heap()
Date: Fri, 28 Jul 2023 13:00:43 +0800
Use the helpers to simplify code, also kill unneeded goto cpy_name.
Signed-off-by Kefeng Wang <[email protected]>
Reviewed-by David Hildenbrand <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Christian Göttsche <[email protected]>
Cc "Christian König" <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc David Airlie <[email protected]>
Cc Eric Paris <[email protected]>
Cc Felix Kuehling <[email protected]>
Cc "Pan, Xinhui" <[email protected]>
Cc Paul Moore <[email protected]>
Cc Stephen Smalley <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
kernel/events/core.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-)
kernel/events/core.c renamed from kernel/events/core.c~perf-core-use-vma_is_initial_stack-and-vma_is_initial_heap +11 -22
@@ -8631,7 +8631,7 @@ static void perf_event_mmap_event(structunsigned int size;char tmp[16 ];char *buf =NULL ; -char *name; +char *name =NULL ;if (vma->vm_flags &VM_READ ) prot |=PROT_READ ;
@@ -8678,29 +8678,18 @@ static void perf_event_mmap_event(struct goto got_name; }else { -if (vma->vm_ops && vma->vm_ops->name) { +if (vma->vm_ops && vma->vm_ops->name) name = (char *) vma->vm_ops->name (vma); -if (name) - goto cpy_name; +if (!name) + name = (char *)arch_vma_name (vma); +if (!name) { +if (vma_is_initial_heap (vma)) + name ="[heap]" ; +else if (vma_is_initial_stack (vma)) + name ="[stack]" ; +else + name ="//anon" ; } - - name = (char *)arch_vma_name (vma); -if (name) - goto cpy_name; - -if (vma->vm_start <= vma->vm_mm->start_brk && - vma->vm_end >= vma->vm_mm->brk) { - name ="[heap]" ; - goto cpy_name; - } -if (vma->vm_start <= vma->vm_mm->start_stack && - vma->vm_end >= vma->vm_mm->start_stack) { - name ="[stack]" ; - goto cpy_name; - } - - name ="//anon" ; - goto cpy_name; } cpy_name:
_
Patches currently in -mm which might be from [email protected] are