* [Qemu-devel] cpu_exit every time for a jump tb (containing only the "b" instruction)
@ 2009-07-06 3:40 阮安邦
0 siblings, 0 replies; only message in thread
From: 阮安邦 @ 2009-07-06 3:40 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
Hi, list
I am currently profiling qemu-system-arm. I wrote a simple ARM
assembly only to add r0 infinitely:
* add_nums:
add r0, r0, r1
b add_nums*
I forced a tb to contain only one instruction, and I got cpu_exit
every time the tb for "*b add_nums"* was executed. It exited the cpu_exec
loop every time, and then reentered it and executed it without cpu_exit.
Following are the executing sequences. I dumped the "in_asm" for a tb
every time it was executed. And wrapped the *tcg_qemu_tb_exec*() with
qemu_log().
*IN:
0x8001000c: b 0x80010008
before tcg_qemu_tb_exec
cpu_exit
after tcg_qemu_tb_exec*
*IN:
0x8001000c: b 0x80010008
before tcg_qemu_tb_exec
after tcg_qemu_tb_exec
IN:
0x80010008: add r0, r0, r1
before tcg_qemu_tb_exec
after tcg_qemu_tb_exec
IN:
0x8001000c: b 0x80010008
before tcg_qemu_tb_exec
cpu_exit
after tcg_qemu_tb_exec
*
It seems like the cpu_exit was called when * tcg_qemu_tb_exec *was
executing. However, * tcg_qemu_tb_exec* is only to execute the translated
native code (am i right?), how can it call the qemu func (cpu_exit)? Or it
is called by other func executing simultaneously with * tcg_qemu_tb_exec*?*
* And why cpu_exit is called everytime, it really comsumes lots of ticks.~
Any suggestions? Great thanks!
Regards,
Ryan
[-- Attachment #2: Type: text/html, Size: 1669 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-06 3:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-06 3:40 [Qemu-devel] cpu_exit every time for a jump tb (containing only the "b" instruction) 阮安邦
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).