qemu-riscv.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Nazerke Turtayeva <nturtayeva@ucsb.edu>
Cc: qemu-riscv@nongnu.org, qemu-devel@nongnu.org
Subject: Re: What riscv tracing tools do you recommend and how are they accurate for measurements?
Date: Wed, 6 Mar 2024 14:44:18 +1000	[thread overview]
Message-ID: <CAKmqyKN2W+xXUKxex_HfaNgMhGd-=q0j5cA6pssp2Kh4y38rSQ@mail.gmail.com> (raw)
In-Reply-To: <CAHY78Bq6AdcZPuFRbdShDPvgmgcoB+PKLWqPuOoX3vdJ-NsZ+A@mail.gmail.com>

On Thu, Feb 29, 2024 at 11:21 PM Nazerke Turtayeva <nturtayeva@ucsb.edu> wrote:
>
> Hi everyone,
>
> Recently, I was planning to measure the performance of my application of interest for potential RISC-V hardware. Hence, I started my simulations from Spike to analyze dynamic instruction traces and instruction count, nevertheless given it does not support multithreading, I started using Qemu to test my app too. However, it seems like I cannot rely on timing results of Qemu for comparing different implementations. Accordingly, given I am brand new to the Qemu ecosystem, I was wondering whether I am missing some important mainstream instrumentation and tracing tools that I can use for performance evaluation of my target app in other ways. Particularly, I want to understand implications of adding custom ISA instructions to the performance of my application.

Hello,

QEMU is an emulator so it isn't great at timing analysis.

QEMU is useful for instruction traces though. If you use icount [1]
you can get a deterministic-ish setup which is very useful for
instruction counting during execution. I'm not sure what custom
instructions you are adding, but you can test if they reduce the
number of instructions executed. Note that QEMU doesn't model timing
though, so it might not be an accurate representation of real life
performance.

You can use a plugin (see [2] for some examples) to generate
instruction, memory or other more specific traces.

1: https://www.qemu.org/docs/master/devel/tcg-icount.html
2: https://www.qemu.org/docs/master/devel/tcg-plugins.html#example-plugins

Alistair

>
> In this regard, do you have any recommendations on where I can look?
>
> Thanks,
> Best wishes
>
> --
> Nazerke Turtayeva
> Graduate Student
> Electrical and Computer Engineering, Computer Science
> Email: nturtayeva@ucsb.edu
> UC Santa Barbara


      reply	other threads:[~2024-03-06  4:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29  4:27 What riscv tracing tools do you recommend and how are they accurate for measurements? Nazerke Turtayeva
2024-03-06  4:44 ` Alistair Francis [this message]

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='CAKmqyKN2W+xXUKxex_HfaNgMhGd-=q0j5cA6pssp2Kh4y38rSQ@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=nturtayeva@ucsb.edu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).