qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Trying to Understand QEMU's Low Level Functionality ...
@ 2007-10-23 23:33 Atoosaah S
  2007-10-24  3:22 ` Igor Kovalenko
  0 siblings, 1 reply; 2+ messages in thread
From: Atoosaah S @ 2007-10-23 23:33 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2150 bytes --]

I'm using qemu version 0.8.2 on linux.

I'm currently successful in creating the result.txt (with the command: prof
/intsall_path/qemu gmon.out > result.txt), but the call graph created does
not show my functions of interest.

For example i'm trying to understand the sequence of calls qemu makes to
read/write from the disk image. Using print statements i see the function
ide_read_dma_cb (from hw directory, file ide.c) being called; as well as
bdrv_read from (qemu root directory, file block.c). The only ide function i
see in result.txt is ide_init2 and ide_init_ioport, and the only bdrv type
functions are bdrv_open2 and bdrv_new. But, listing the symbol table via
"nm" on qemu, does display my functions of interest (i.e. bdrv_read,
bdrv_write, ...). I should see these functions in the gprof result since,
for example, they are executed frequently (during OS bootup, and
writting/reading to/from a sample large file)

1. Why am I only seeing specific low level functions in the call graph?
2. Is there a more clear way of finding out how (i.e. sequence of calls)
qemu make to write to the disk image?

thank you,
atoosaah




On 10/12/07, Atoosaah wrote:
>
> I'd appreciate any input on how to run gprof successfully on qemu. I'm new
> to gprof and am probably missing some steps.  I successfully ran gprof on a
> sorting program available online, then I attempted to run gprof on qemu.
>
> Here are the steps I take:
>
> I'm trying to run gprof on qemu, but am unsuccessful. my os is linux, my
> qemu version is 0.8.2. I configure qemu with the options "configure
> --prefix=/install_path --enable-gprof. Then I make and make install. I run
> qemu successfully using the options /install_path/qemu -hda diskimage.img-m 256 which results in the
> gmon.out file. My run of qemu involved starting the image (virtual linux
> OS), running a few simple commands and shutting the image down.
>
> Finally, I run gprof /intsall_path/qemu gmon.out > result.txt which gives
> the error: gprof: file 'qemu' has no symbols'
>
> Are there any other configuration options required? Should the image be
> run with differently?
>
>
> thank you,
> atoosaah
>

[-- Attachment #2: Type: text/html, Size: 2540 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] Trying to Understand QEMU's Low Level Functionality ...
  2007-10-23 23:33 [Qemu-devel] Trying to Understand QEMU's Low Level Functionality Atoosaah S
@ 2007-10-24  3:22 ` Igor Kovalenko
  0 siblings, 0 replies; 2+ messages in thread
From: Igor Kovalenko @ 2007-10-24  3:22 UTC (permalink / raw)
  To: qemu-devel

On 10/24/07, Atoosaah S <atoosaah@gmail.com> wrote:
> I'm using qemu version 0.8.2 on linux.
>
> I'm currently successful in creating the result.txt (with the command: prof
> /intsall_path/qemu gmon.out > result.txt), but the call graph created does
> not show my functions of interest.
>
> For example i'm trying to understand the sequence of calls qemu makes to
> read/write from the disk image. Using print statements i see the function
> ide_read_dma_cb (from hw directory, file ide.c) being called; as well as
> bdrv_read from (qemu root directory, file block.c). The only ide function i
> see in result.txt is ide_init2 and ide_init_ioport, and the only bdrv type
> functions are bdrv_open2 and bdrv_new. But, listing the symbol table via
> "nm" on qemu, does display my functions of interest ( i.e. bdrv_read,
> bdrv_write, ...). I should see these functions in the gprof result since,
> for example, they are executed frequently (during OS bootup, and
> writting/reading to/from a sample large file)
>
> 1. Why am I only seeing specific low level functions in the call graph?
> 2. Is there a more clear way of finding out how (i.e. sequence of calls)
> qemu make to write to the disk image?

Try valgrind instead?
valgrind --tool=callgrind --smc-check=all -v


-- 
Kind regards,
Igor V. Kovalenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-24  3:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 23:33 [Qemu-devel] Trying to Understand QEMU's Low Level Functionality Atoosaah S
2007-10-24  3:22 ` Igor Kovalenko

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).