Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2021 16:42:50 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 594389d1de64 - main - Create a stack frame when needed in the arm64 kernel
Message-ID:  <202101131642.10DGgo7L055396@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=594389d1de647cbda3cb36f06c06d3f73b190e82

commit 594389d1de647cbda3cb36f06c06d3f73b190e82
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2021-01-12 14:18:59 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-01-13 16:36:52 +0000

    Create a stack frame when needed in the arm64 kernel
    
    When building the arm64 kernel for use with dtrace or hwpmc we need
    to include a stack frame so they can extract a stack trace.
    
    As with amd64 also build a stack frame in modules.
    
    Sponsored by:   Innovate UK
---
 sys/conf/Makefile.arm64 | 2 +-
 sys/conf/kmod.mk        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64
index 1f5760021f3e..d48826197dbd 100644
--- a/sys/conf/Makefile.arm64
+++ b/sys/conf/Makefile.arm64
@@ -45,7 +45,7 @@ SYSTEM_LD= \
 KERNEL_EXTRA+= ${KERNEL_KO}.bin
 KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin
 
-.if !empty(DDB_ENABLED)
+.if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED)
 CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
 .endif
 
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index b7ba121925ea..c245f447cefb 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -146,7 +146,7 @@ LDFLAGS+=	--build-id=sha1
 .endif
 
 CFLAGS+=	${DEBUG_FLAGS}
-.if ${MACHINE_CPUARCH} == amd64
+.if ${MACHINE_CPUARCH} == aarch64 || ${MACHINE_CPUARCH} == amd64
 CFLAGS+=	-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
 .endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101131642.10DGgo7L055396>