From: Stefan Hajnoczi <stefanha@redhat.com>
To: Nesrine Zouari <nesrine.zouari@enis.tn>
Cc: qemu-devel@nongnu.org, vilanova@ac.upc.edu
Subject: Re: [Qemu-devel] Qemu Trace
Date: Fri, 2 Feb 2018 10:08:43 +0000 [thread overview]
Message-ID: <20180202100843.GD13090@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAPHFV4=P3viF0m0PtqFZZ8_JNxy7G6kXdysYAfSsOJZe=2j7gw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2126 bytes --]
On Thu, Feb 01, 2018 at 04:30:10PM +0100, Nesrine Zouari wrote:
> I am a computer engineering student and I am actually working on my
> graduation project at Lauterbach company. The project is about Qemu Trace
> and as a future I would like to contribute this work to the main line.
>
> My project is divided into two parts:
>
> 1/ Collecting the Guest trace data : The trace solution should be able to
> provide:
>
> a/ Instruction flow Trace
>
> b/ Memory read/write access
>
> c/ Time Stamps.
>
> d/ For tracing rich operating systems that are using MMU, we
> additionally need to trace the task switches.
Lluìs has done the most instrumentation work in qemu.git and can explain
the current status.
The focus in QEMU is more on functional simulation than on low-level
instrumentation. Therefore the instrumentation facilities aren't very
rich. Code changes will be required to get the information you need.
In order to be suitable for upstream they should not be too invasive or
impact performance significantly.
Which CPU architecture are you targeting?
> 2/ Sending the collected data to a third party tool for analysis.
>
> My question is about the first part. I would like to know, which trace
> backend that better fit my use case.
LTTng UST has the highest performance tracing interface. It uses shared
memory to efficiently export trace data to a collector or analysis
process.
It is probably not necessary to invent your own tracer or interface for
capturing trace data. I suggest looking into LTTng UST and trying it
out.
The basic idea would be:
1. Add missing trace events to QEMU
2. Build with ./configure --enable-trace-backend=ust && make
3. Use LTTng tools or write your own collector using the LTTng libraries
4. Enable the trace events that you need for instruction flow, memory
access, and task switching.
The QEMU code changes involved would be changes to trace-events and
placing those trace events into TCG and/or memory API code to record the
necessary information.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2018-02-02 14:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 15:30 [Qemu-devel] Qemu Trace Nesrine Zouari
2018-02-01 23:07 ` Dongli Zhang
2018-02-02 10:08 ` Stefan Hajnoczi [this message]
2018-02-02 10:45 ` Nesrine Zouari
2018-02-02 15:53 ` Peter Maydell
2018-02-05 15:51 ` Stefan Hajnoczi
2018-02-05 15:55 ` Peter Maydell
2018-02-06 9:17 ` Stefan Hajnoczi
2018-02-06 10:55 ` Peter Maydell
2018-02-06 15:44 ` Stefan Hajnoczi
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=20180202100843.GD13090@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=nesrine.zouari@enis.tn \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
/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).