> Date: Wed, 9 Jun 2021 23:05:40 +0200
> From: Tobias Heider <tobias.hei...@stusta.de>
> 
> Hi,
> 
> the diff below adds DT_FA_PROFILE and DT_FA_STATIC defines for arm64
> to skip the probe context frames.
> 
> Here is how a typical arm64 stack trace looks with and without diff:
> 
> dt_pcb_ring_get+0x130
> dt_prov_profile_enter+0x90
> hardclock+0x1b0
> agtimer_intr+0xa4
> ampintc_irq_handler+0x1c0
> arm_cpu_irq+0x34
> handle_el1h_irq+0x70
> sched_idle+0x294      <-- Diff skips everything above this
> sched_idle+0x294
> proc_trampoline+0x14
> 
> ok?

There is something not quite right with the stack unwinder on arm64.
This is illustrated in the stack trace above where sched_idle+0x294
shows up twice.

Another issue is that there are multiple interrupt controllers on
arm64 and I'm not sure the number of frames to skip is the same for
all of these.

> Index: dt_dev.c
> ===================================================================
> RCS file: /mount/openbsd/cvs/src/sys/dev/dt/dt_dev.c,v
> retrieving revision 1.14
> diff -u -p -r1.14 dt_dev.c
> --- dt_dev.c  22 May 2021 21:25:38 -0000      1.14
> +++ dt_dev.c  9 Jun 2021 20:57:14 -0000
> @@ -56,6 +56,9 @@
>  #if defined(__amd64__)
>  #define DT_FA_PROFILE        5
>  #define DT_FA_STATIC 2
> +#elif defined(__arm64__)
> +#define DT_FA_PROFILE        7
> +#define DT_FA_STATIC 2
>  #elif defined(__powerpc64__)
>  #define DT_FA_PROFILE        6
>  #define DT_FA_STATIC 2
> 
> 

Reply via email to