* [Qemu-devel] anybody using MMIO tracing?
@ 2015-11-02 17:18 Hollis Blanchard
2015-11-06 11:12 ` Stefan Hajnoczi
0 siblings, 1 reply; 5+ messages in thread
From: Hollis Blanchard @ 2015-11-02 17:18 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
I'm trying to use the memory_region_ops_read/write tracepoints. They
produce output like this:
memory_region_ops_write 0.000 pid=8861 mr=0x185b1e8 addr=0x0
value=0x3 size=0x4
memory_region_ops_write 165.000 pid=8861 mr=0x185b1e8 addr=0x80
value=0xffffffff size=0x4
memory_region_ops_write 155.000 pid=8861 mr=0x1914240 addr=0x0
value=0x3 size=0x4
memory_region_ops_write 2.000 pid=8861 mr=0x185b320 addr=0x0
value=0x3 size=0x4
memory_region_ops_write 134.000 pid=8861 mr=0x1914240 addr=0x4
value=0x80 size=0x4
How do I discover which devices are represented by MemoryRegions
0x185b1e8 and 0x1914240? Or alternatively how do I discover the full
addresses? Thanks.
--
Hollis Blanchard
Mentor Graphics Emulation Division
[-- Attachment #2: Type: text/html, Size: 1108 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] anybody using MMIO tracing?
2015-11-02 17:18 [Qemu-devel] anybody using MMIO tracing? Hollis Blanchard
@ 2015-11-06 11:12 ` Stefan Hajnoczi
2015-11-06 11:15 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2015-11-06 11:12 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]
On Mon, Nov 02, 2015 at 09:18:03AM -0800, Hollis Blanchard wrote:
> I'm trying to use the memory_region_ops_read/write tracepoints. They produce
> output like this:
>
> memory_region_ops_write 0.000 pid=8861 mr=0x185b1e8 addr=0x0
> value=0x3 size=0x4
> memory_region_ops_write 165.000 pid=8861 mr=0x185b1e8 addr=0x80
> value=0xffffffff size=0x4
> memory_region_ops_write 155.000 pid=8861 mr=0x1914240 addr=0x0
> value=0x3 size=0x4
> memory_region_ops_write 2.000 pid=8861 mr=0x185b320 addr=0x0
> value=0x3 size=0x4
> memory_region_ops_write 134.000 pid=8861 mr=0x1914240 addr=0x4
> value=0x80 size=0x4
>
> How do I discover which devices are represented by MemoryRegions 0x185b1e8
> and 0x1914240? Or alternatively how do I discover the full addresses?
As a KVM user I use the kvm:kvm_mmio and kvm:kvm_pio kernel trace
events.
I'm not sure of the best way but you could look at memory.c:mtree_info()
(aka "info mtree" monitor command) and print out all MemoryRegion
pointers so you can correlate them with the trace output.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] anybody using MMIO tracing?
2015-11-06 11:12 ` Stefan Hajnoczi
@ 2015-11-06 11:15 ` Peter Maydell
2015-11-06 17:47 ` Hollis Blanchard
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2015-11-06 11:15 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Hollis Blanchard, QEMU Developers
On 6 November 2015 at 11:12, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Mon, Nov 02, 2015 at 09:18:03AM -0800, Hollis Blanchard wrote:
>> I'm trying to use the memory_region_ops_read/write tracepoints. They produce
>> output like this:
>>
>> memory_region_ops_write 0.000 pid=8861 mr=0x185b1e8 addr=0x0
>> value=0x3 size=0x4
>> memory_region_ops_write 165.000 pid=8861 mr=0x185b1e8 addr=0x80
>> value=0xffffffff size=0x4
>> memory_region_ops_write 155.000 pid=8861 mr=0x1914240 addr=0x0
>> value=0x3 size=0x4
>> memory_region_ops_write 2.000 pid=8861 mr=0x185b320 addr=0x0
>> value=0x3 size=0x4
>> memory_region_ops_write 134.000 pid=8861 mr=0x1914240 addr=0x4
>> value=0x80 size=0x4
>>
>> How do I discover which devices are represented by MemoryRegions 0x185b1e8
>> and 0x1914240? Or alternatively how do I discover the full addresses?
>
> As a KVM user I use the kvm:kvm_mmio and kvm:kvm_pio kernel trace
> events.
Is there a reason why we can't print the mr->name in this tracing?
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] anybody using MMIO tracing?
2015-11-06 11:15 ` Peter Maydell
@ 2015-11-06 17:47 ` Hollis Blanchard
2015-11-13 9:33 ` Stefan Hajnoczi
0 siblings, 1 reply; 5+ messages in thread
From: Hollis Blanchard @ 2015-11-06 17:47 UTC (permalink / raw)
To: Peter Maydell, Stefan Hajnoczi; +Cc: Paolo Bonzini, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]
On 11/06/2015 03:15 AM, Peter Maydell wrote:
> On 6 November 2015 at 11:12, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>> On Mon, Nov 02, 2015 at 09:18:03AM -0800, Hollis Blanchard wrote:
>>> I'm trying to use the memory_region_ops_read/write tracepoints. They produce
>>> output like this:
>>>
>>> memory_region_ops_write 0.000 pid=8861 mr=0x185b1e8 addr=0x0
>>> value=0x3 size=0x4
>>> memory_region_ops_write 165.000 pid=8861 mr=0x185b1e8 addr=0x80
>>> value=0xffffffff size=0x4
>>> memory_region_ops_write 155.000 pid=8861 mr=0x1914240 addr=0x0
>>> value=0x3 size=0x4
>>> memory_region_ops_write 2.000 pid=8861 mr=0x185b320 addr=0x0
>>> value=0x3 size=0x4
>>> memory_region_ops_write 134.000 pid=8861 mr=0x1914240 addr=0x4
>>> value=0x80 size=0x4
>>>
>>> How do I discover which devices are represented by MemoryRegions 0x185b1e8
>>> and 0x1914240? Or alternatively how do I discover the full addresses?
>> As a KVM user I use the kvm:kvm_mmio and kvm:kvm_pio kernel trace
>> events.
> Is there a reason why we can't print the mr->name in this tracing?
That works, and I was going to suggest it if there's no better answer.
I'm not sure however if it's possible to disambiguate the trace messages
if you have multiple instances of the same device type. Other
improvements could be important too, like displaying which core was
performing the access. So maybe just displaying the name first is a good
step forward for now, and separately there's an improvement wishlist for
the future.
I was just confused because Paolo's original patch
<http://osdir.com/ml/qemu-devel/2013-07/msg04848.html> said "This is
quite handy to debug softmmu targets", so I figured I must be missing
something that would make it handy. :-)
By the way, docs/tracing.txt says:
The "simple" backend currently does not capture string arguments, it
simply
records the char* pointer value instead of the string that is
pointed to.
This seems no longer to be the case, because string arguments display
fine for me...
Hollis Blanchard
Mentor Graphics Emulation Division
[-- Attachment #2: Type: text/html, Size: 2867 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] anybody using MMIO tracing?
2015-11-06 17:47 ` Hollis Blanchard
@ 2015-11-13 9:33 ` Stefan Hajnoczi
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2015-11-13 9:33 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: Peter Maydell, QEMU Developers, Paolo Bonzini
[-- Attachment #1: Type: text/plain, Size: 430 bytes --]
On Fri, Nov 06, 2015 at 09:47:45AM -0800, Hollis Blanchard wrote:
> By the way, docs/tracing.txt says:
>
> The "simple" backend currently does not capture string arguments, it
> simply
> records the char* pointer value instead of the string that is
> pointed to.
>
> This seems no longer to be the case, because string arguments display fine
> for me...
You are right, thanks for spotting it!
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-11-13 9:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02 17:18 [Qemu-devel] anybody using MMIO tracing? Hollis Blanchard
2015-11-06 11:12 ` Stefan Hajnoczi
2015-11-06 11:15 ` Peter Maydell
2015-11-06 17:47 ` Hollis Blanchard
2015-11-13 9:33 ` Stefan Hajnoczi
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).