From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6xVL-0000UH-9a for qemu-devel@nongnu.org; Thu, 10 Dec 2015 04:27:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6xVK-00005K-In for qemu-devel@nongnu.org; Thu, 10 Dec 2015 04:27:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6xVK-00005G-DP for qemu-devel@nongnu.org; Thu, 10 Dec 2015 04:27:14 -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> <5668C9D9.8010209@mentor.com> From: Paolo Bonzini Message-ID: <56694569.3050204@redhat.com> Date: Thu, 10 Dec 2015 10:27:05 +0100 MIME-Version: 1.0 In-Reply-To: <5668C9D9.8010209@mentor.com> Content-Type: text/plain; charset=windows-1252 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: Hollis Blanchard , Stefan Hajnoczi , qemu-devel On 10/12/2015 01:39, Hollis Blanchard wrote: > > Not sure I understand. Do you mean something like this? > -trace_memory_region_ops_write(mr, addr, tmp, size); > +trace_memory_region_ops_write(mr, addr, mr->ops->write == > subpage_write, tmp, size); There is also a mr->subpage that you can use. > Maybe this isn't the right tracepoint to begin with. I'm trying to trace > guest MMIO activity; is there a better place to intercept that? It's the right one, but the problem with tracepoints is that other people may use them for something other than what you envisioned. For them, including subpages may be the right thing. Adding a flag to the tracepoint is the middle ground. I'm okay also with the solution you proposed in the other message. Paolo