[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recompile QEMU with frame-pointers
From: |
Peter Maydell |
Subject: |
Re: Recompile QEMU with frame-pointers |
Date: |
Thu, 28 Jan 2021 10:29:56 +0000 |
On Thu, 28 Jan 2021 at 08:42, Jakob Bohm <jb-gnumlists@wisemo.com> wrote:
>
> On 2021-01-27 15:14, Salvatore Mazzarino wrote:
>
> I’m trying to profile my QEMU process but what I get is a stack full of
> unknown.
>
> I would then need to recompile QEMU with -fno-omit-frame-pointer.
>
> Do you know if there is a version already built for that purpose?
>
> I am not sure, but I suspect that compiler-generated frame pointer
> code would interfere with the TCG compilation of tiny code snippets
> to be pasted together at runtime by the translated code generator.
TCG has not worked by pasting together compiled snippets for
many many years now. Compiling QEMU's C code with a frame
pointer should be fine. You'll find that the JITted code looks
like a single big function (ie there is no internal structure
to it) but the entry-to-JIT prologue code should set up the
frame pointer correctly so the stack frame looks like
C helper function
[JITted code]
C code that called into JITted code
There's no pre-built QEMU that was built with -fno-omit-frame-pointer
because it would be pretty useless for anything except debugging
QEMU itself, and if you're doing that you want to be working with
the QEMU source code rather than a prebuilt binary anyway. You
can easily build one yourself using configure's --extra-cflags
option.
thanks
-- PMM