qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: 陳韋任 <chenwj@iis.sinica.edu.tw>, "Xin Tong" <xerox.time.tech@gmail.com>
Subject: Re: [Qemu-devel] oprofile on qemu
Date: Wed, 23 Nov 2011 21:47:10 +0400	[thread overview]
Message-ID: <201111232147.10602.jcmvbkbc@gmail.com> (raw)
In-Reply-To: <CALKntY3whrWeK1o+ivy8Q-qRKNMPmNdomdE0Y7y_KtmAp7h0YQ@mail.gmail.com>

> I oprofiled QEMU with some workloads, i.e. SPECjbb on Ubuntu Linux, i
> see QEMU spent about 60 - 70% of the time in the code cache ( code
> cache size is 256MB ). but I want to know which TB takes the most
> amount of time.

I doubt that it's possible to profile TB code by external tools without QEMU assistance.
Probably it's easier to account individual TB timing from within QEMU, like it is now done for translation,
see places marked with #ifdef CONFIG_PROFILER.

With TB chaining disabled, TB execution starts with tcg_qemu_tb_exec, there's one call to it in cpu_exec().
TB may exit normally, or via longjmp, so there are two places in cpu_exec() where it must be caught.

Virtual/physical mapping must also be taken care of, but it depends on your application.

Thanks.
-- Max

      reply	other threads:[~2011-11-23 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 13:23 [Qemu-devel] oprofile on qemu Xin Tong
2011-11-23  8:10 ` 陳韋任
2011-11-23 16:19   ` Xin Tong
2011-11-23 17:47     ` Max Filippov [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=201111232147.10602.jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=chenwj@iis.sinica.edu.tw \
    --cc=qemu-devel@nongnu.org \
    --cc=xerox.time.tech@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).