From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAyDY-00057M-AW for qemu-devel@nongnu.org; Wed, 05 Feb 2014 03:52:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAyDS-0000N3-AH for qemu-devel@nongnu.org; Wed, 05 Feb 2014 03:52:24 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:36654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAyDR-0000Lm-Q3 for qemu-devel@nongnu.org; Wed, 05 Feb 2014 03:52:18 -0500 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id C49A63EE1B9 for ; Wed, 5 Feb 2014 17:52:13 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id B703E45DE55 for ; Wed, 5 Feb 2014 17:52:13 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.nic.fujitsu.com [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 9E17C45DE5A for ; Wed, 5 Feb 2014 17:52:13 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 904071DB8032 for ; Wed, 5 Feb 2014 17:52:13 +0900 (JST) Received: from m0001.s.css.fujitsu.com (m0001.s.css.fujitsu.com [10.23.4.186]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 465D21DB8040 for ; Wed, 5 Feb 2014 17:52:13 +0900 (JST) Message-ID: <52F1FB93.7080500@jp.fujitsu.com> Date: Wed, 05 Feb 2014 17:51:31 +0900 From: Kazuya Saito MIME-Version: 1.0 References: <52E73388.90601@jp.fujitsu.com> <20140131103750.GF30735@stefanha-thinkpad.redhat.com> <52F079F5.1040009@jp.fujitsu.com> <20140204090214.GC6919@stefanha-thinkpad.redhat.com> In-Reply-To: <20140204090214.GC6919@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] trace backend: introduce multi tracing backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "qemu-devel@nongnu.org" (2014/02/04 18:02), Stefan Hajnoczi wrote:> On Tue, Feb 04, 2014 at 02:26:13PM +0900, Kazuya Saito wrote: >> > (2014/01/31 19:37), Stefan Hajnoczi wrote:> On Tue, Jan 28, 2014 at 01:35:20PM +0900, Kazuya Saito wrote: >>>> > >> def h(events): >>>> > >> + pass >>> > > >>> > > I thought all code generation now happens in backends.common.h(), so >>> > > this function will not be called anymore? >> > >> > It is called in tracetool.backend.compatible(). So, it is required when >> > selecting only dtrace backend. >> > >>> > > The same is true for c() defined in this file. >> > >> > It is also required for the same reason as dtrace.h(). > tracetool.backend.compatible() is testing for the existence of a > function that is not used anywhere else. Backend code doesn't make it > obvious why this is necessary. > > We should either make compatible() work (e.g. by testing body_ > and ensuring all formats use the "body_" function prefix) or with > something explicit like a .supported_formats = ['c', 'h'] list. I think that checking .supported_formats is better. I'll change compatible() like that. >>>> > >> +util-obj-$(CONFIG_TRACE_FTRACE) += multi.o ftrace.o >>> > > >>> > > How about adding multi.o to util-obj-y just like control.o below? All >>> > > these object files are added to libqemuutil.a. The linker will only >>> > > pull in object files that are needed (based on symbol dependencies) so >>> > > there is no harm in uncoditionally building multi.o. >> > >> > If adding multi.o to util-obj-y, compile error occurs when selecting >> > only dtrace backend. This is because the function trace_print_events(), >> > trace_event_set_state_dynamic_backend() and trace_backend_init() are >> > declared doubly in multi.o and default.o. >> > So, I'm going to leave it. Do you have any suggestions? > I guess it should be: > > ifeq ($(CONFIG_TRACE_DEFAULT),y) > util-obj-y += default.o > else > util-obj-y += multi.o > endif Thank you. I'll fix it as above. Thanks, Kazuya Saito