qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, "Ilya Leoshkevich" <iii@linux.ibm.com>,
	"Vanderson M . do Rosario" <vandersonmr2@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PULL 3/5] tcg: add perfmap and jitdump
Date: Thu, 29 Jun 2023 13:31:46 +0200	[thread overview]
Message-ID: <e1112615-0e6c-e0ea-aa60-1d94d1da26ea@linaro.org> (raw)
In-Reply-To: <20230116223637.3512814-4-richard.henderson@linaro.org>

Hi Richard, Alex,

On 16/1/23 23:36, Richard Henderson wrote:
> From: Ilya Leoshkevich <iii@linux.ibm.com>
> 
> Add ability to dump /tmp/perf-<pid>.map and jit-<pid>.dump.
> The first one allows the perf tool to map samples to each individual
> translation block. The second one adds the ability to resolve symbol
> names, line numbers and inspect JITed code.
> 
> Example of use:
> 
>      perf record qemu-x86_64 -perfmap ./a.out
>      perf report
> 
> or
> 
>      perf record -k 1 qemu-x86_64 -jitdump ./a.out
>      DEBUGINFOD_URLS= perf inject -j -i perf.data -o perf.data.jitted
>      perf report -i perf.data.jitted
> 
> Co-developed-by: Vanderson M. do Rosario <vandersonmr2@gmail.com>
> Co-developed-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> Message-Id: <20230112152013.125680-4-iii@linux.ibm.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   docs/devel/tcg.rst        |  23 +++
>   accel/tcg/perf.h          |  49 +++++
>   accel/tcg/perf.c          | 375 ++++++++++++++++++++++++++++++++++++++
>   accel/tcg/translate-all.c |   7 +
>   linux-user/exit.c         |   2 +
>   linux-user/main.c         |  15 ++
>   softmmu/vl.c              |  11 ++
>   tcg/tcg.c                 |   2 +
>   accel/tcg/meson.build     |   1 +
>   qemu-options.hx           |  20 ++
>   10 files changed, 505 insertions(+)
>   create mode 100644 accel/tcg/perf.h
>   create mode 100644 accel/tcg/perf.c


> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index da91779890..9b7df71e7a 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -61,6 +61,7 @@
>   #include "exec/log.h"
>   #include "tcg/tcg-ldst.h"
>   #include "tcg-internal.h"
> +#include "accel/tcg/perf.h"

Is it OK to include an header from QEMU's accel/tcg/ here?
I thought we wanted to keep tcg/ kinda independant (or maybe
this is already too late and this isn't a concern anymore).

>   /* Forward declarations for functions declared in tcg-target.c.inc and
>      used here. */
> @@ -913,6 +914,7 @@ void tcg_prologue_init(TCGContext *s)
>   #endif
>   
>       prologue_size = tcg_current_code_size(s);
> +    perf_report_prologue(s->code_gen_ptr, prologue_size);



  parent reply	other threads:[~2023-06-29 11:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 22:36 [PULL 0/5] tcg patch queue Richard Henderson
2023-01-16 22:36 ` [PULL 1/5] linux-user: Clean up when exiting due to a signal Richard Henderson
2023-01-16 22:36 ` [PULL 2/5] accel/tcg: Add debuginfo support Richard Henderson
2023-01-16 22:36 ` [PULL 3/5] tcg: add perfmap and jitdump Richard Henderson
2023-06-02 17:21   ` Peter Maydell
2023-06-03 20:35     ` Ilya Leoshkevich
2023-06-29 11:31   ` Philippe Mathieu-Daudé [this message]
2023-06-29 12:59     ` Richard Henderson
2023-06-30 12:39       ` Ilya Leoshkevich
2023-06-30 13:24         ` Richard Henderson
2023-12-07  9:51           ` Philippe Mathieu-Daudé
2025-05-19 15:07   ` Peter Maydell
2023-01-16 22:36 ` [PULL 4/5] util/bufferiszero: Use __attribute__((target)) for avx2/avx512 Richard Henderson
2023-01-16 22:36 ` [PULL 5/5] accel/tcg: Split out cpu_exec_{setjmp,loop} Richard Henderson
2023-01-17 15:47 ` [PULL 0/5] tcg patch queue Peter Maydell
2023-01-20  9:41 ` Thomas Huth
2023-01-20 10:50   ` Alex Bennée
2023-01-20 10:53   ` Ilya Leoshkevich
2023-01-20 12:51     ` Thomas Huth
2023-01-20 16:49       ` Alex Bennée
2023-01-21  6:07   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1112615-0e6c-e0ea-aa60-1d94d1da26ea@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=iii@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=vandersonmr2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).