From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6pcK-0001T7-FD for qemu-devel@nongnu.org; Wed, 09 Dec 2015 20:01:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6pcF-00079L-Fs for qemu-devel@nongnu.org; Wed, 09 Dec 2015 20:01:56 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:42323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6pcF-000792-Ad for qemu-devel@nongnu.org; Wed, 09 Dec 2015 20:01:51 -0500 References: <1447290598-13069-1-git-send-email-hollis_blanchard@mentor.com> <1447290598-13069-2-git-send-email-hollis_blanchard@mentor.com> <20151113102313.GG6650@stefanha-x1.localdomain> <564BC85C.2090106@mentor.com> <20151125072038.GA7357@stefanha-x1.localdomain> <56689518.1060502@mentor.com> <5668992D.9060101@redhat.com> From: Hollis Blanchard Message-ID: <5668CEFC.1070201@mentor.com> Date: Wed, 9 Dec 2015 17:01:48 -0800 MIME-Version: 1.0 In-Reply-To: <5668992D.9060101@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] subpage_write() and duplicated memory_region_ops_write tracepoints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Stefan Hajnoczi Cc: qemu-devel@nongnu.org On 12/09/2015 01:12 PM, Paolo Bonzini wrote: > > On 09/12/2015 21:54, Hollis Blanchard wrote: >> #0 trace_memory_region_ops_write (mr=0x185b620, addr=16, absaddr=738205712, value=136, size=4) >> at /scratch1/hblancha/install/customq/qemu-2.4.0/src/trace/generated-tracers.h:7374 >> #1 0x000000000045eb8a in *memory_region_write_with_attrs_accessor* (mr=0x185b620, addr=16, >> value=0x45203338, size=4, shift=0, mask=4294967295, attrs=...) >> at /scratch1/hblancha/install/customq/qemu-2.4.0/src/memory.c:513 >> #2 0x000000000045ed08 in access_with_adjusted_size (addr=16, value=0x45203338, size=4, >> access_size_min=1, access_size_max=4, access=0x45eb15 , >> mr=0x185b620, attrs=...) at /scratch1/hblancha/install/customq/qemu-2.4.0/src/memory.c:556 >> #3 0x0000000000461ed7 in memory_region_dispatch_write (mr=0x185b620, addr=16, data=136, size=4, >> attrs=...) at /scratch1/hblancha/install/customq/qemu-2.4.0/src/memory.c:1214 >> #4 0x0000000000411bbf in address_space_rw (as=0x11f3440, addr=738205712, attrs=..., >> buf=0x45203490 "\210", len=4, is_write=true) >> at /scratch1/hblancha/install/customq/qemu-2.4.0/src/exec.c:2497 >> #5 0x0000000000411ea9 in address_space_write (as=0x11f3440, addr=738205712, attrs=..., >> buf=0x45203490 "\210", len=4) at /scratch1/hblancha/install/customq/qemu-2.4.0/src/exec.c:2579 >> #6 0x0000000000410d89 in subpage_write (opaque=0x19148f0, addr=16, value=136, len=4, attrs=...) >> at /scratch1/hblancha/install/customq/qemu-2.4.0/src/exec.c:2139 >> #7 0x000000000045ebb2 in *memory_region_write_with_attrs_accessor* (mr=0x19148f0, addr=16, >> value=0x452035a8, size=4, shift=0, mask=4294967295, attrs=...) >> at /scratch1/hblancha/install/customq/qemu-2.4.0/src/memory.c:516 >> #8 0x000000000045ed08 in access_with_adjusted_size (addr=16, value=0x452035a8, size=4, >> access_size_min=1, access_size_max=8, access=0x45eb15 , >> mr=0x19148f0, attrs=...) at /scratch1/hblancha/install/customq/qemu-2.4.0/src/memory.c:556 >> #9 0x0000000000461ed7 in memory_region_dispatch_write (mr=0x19148f0, addr=16, data=136, size=4, >> attrs=...) at /scratch1/hblancha/install/customq/qemu-2.4.0/src/memory.c:1214 >> #10 0x000000000046c61c in io_writel (env=0x2aabace89268, iotlbentry=0x2aabace99808, val=136, >> addr=18446743523953745936, retaddr=1107508028) >> at /scratch1/hblancha/install/customq/qemu-2.4.0/src/softmmu_template.h:470 >> #11 0x000000000046c3cb in helper_le_stl_mmu (env=0x2aabace89268, addr=18446743523953745936, val=136, >> oi=33, retaddr=1107508028) >> at /scratch1/hblancha/install/customq/qemu-2.4.0/src/softmmu_template.h:510 >> #12 0x0000000042033b3e in code_gen_buffer () >> >> >> The first tracepoint in each pair is an artifact, and should be omitted. >> Any suggestions? We could special case "if (mr->ops->write != >> subpage_write) { emit tracepoint }", but that's a bit of a hack... :-) > You can add an argument to the tracepoint for mr->subpage. I would keep > the duplicate however. OK, I understand your suggestion now, but not your rationale. Are you thinking about QEMU developers needing to debug the subpage implementation? If so, I think tracing guest MMIO activity is a far more common need... perhaps we could use a different tracepoint for the latter? if (mr->subpage) trace_memory_region_ops_write_subpage(mr, addr, tmp, size); else trace_memory_region_ops_write(mr, addr, tmp, size); That way, people debugging guest behavior can enable just the memory_region_ops_write tracepoint, and QEMU developers can also enable the other. Hollis Blanchard Mentor Graphics Emulation Division