From: drahn Date: Thu, 19 Jul 2018 17:38:12 +0000 (+0000) Subject: Enable kernel profiling on arm64 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3f55d2414b2ca7b0ddbd01e7323627228645b049;p=openbsd Enable kernel profiling on arm64 sigcode() runs in user land context, so should not call mcount. Without the symbol type on the exception entry functions, gprof doesn't correctly identify the caller for exception entry symbols. ok kettenis@ --- diff --git a/sys/arch/arm64/arm64/exception.S b/sys/arch/arm64/arm64/exception.S index 41a58543d66..33ad82f52c6 100644 --- a/sys/arch/arm64/arm64/exception.S +++ b/sys/arch/arm64/arm64/exception.S @@ -1,4 +1,4 @@ -/* $OpenBSD: exception.S,v 1.6 2018/06/22 16:08:12 drahn Exp $ */ +/* $OpenBSD: exception.S,v 1.7 2018/07/19 17:38:12 drahn Exp $ */ /*- * Copyright (c) 2014 Andrew Turner * All rights reserved. @@ -167,6 +167,7 @@ handle_el1h_error: .endm .globl handle_el0_sync + .type handle_el0_sync,@function handle_el0_sync: save_registers 0 mov x0, sp @@ -177,6 +178,7 @@ handle_el0_sync: return .globl handle_el0_irq + .type handle_el0_irq,@function handle_el0_irq: save_registers 0 bl _C_LABEL(vfp_save) @@ -188,6 +190,7 @@ handle_el0_irq: return .globl handle_el0_error + .type handle_el0_error,@function handle_el0_error: save_registers 0 mov x0, sp diff --git a/sys/arch/arm64/arm64/locore.S b/sys/arch/arm64/arm64/locore.S index 379366f4b66..e81cffc3f1e 100644 --- a/sys/arch/arm64/arm64/locore.S +++ b/sys/arch/arm64/arm64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.22 2018/01/28 13:17:45 kettenis Exp $ */ +/* $OpenBSD: locore.S,v 1.23 2018/07/19 17:38:12 drahn Exp $ */ /*- * Copyright (c) 2012-2014 Andrew Turner * All rights reserved. @@ -277,7 +277,9 @@ initstack: initstack_end: .text -ENTRY(sigcode) + .globl _C_LABEL(sigcode) + .type _C_LABEL(sigcode),@function +_C_LABEL(sigcode): sub sp, sp, #17 * 32 mov x3, sp stp q0, q1, [x3], #32