From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XopWe-0006qr-WE for qemu-devel@nongnu.org; Thu, 13 Nov 2014 03:13:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XopWa-0006Iq-4R for qemu-devel@nongnu.org; Thu, 13 Nov 2014 03:13:08 -0500 Message-ID: <5464675F.8070906@huawei.com> Date: Thu, 13 Nov 2014 16:10:07 +0800 From: Gonglei MIME-Version: 1.0 References: <1415847577-5820-1-git-send-email-arei.gonglei@huawei.com> <1415847577-5820-3-git-send-email-arei.gonglei@huawei.com> <871tp7o7fo.fsf@blackfin.pond.sub.org> In-Reply-To: <871tp7o7fo.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] acpi-build: Make DPRINTF working for acpi-build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: "qemu-trivial@nongnu.org" , "pbonzini@redhat.com" , "mst@redhat.com" , "qemu-devel@nongnu.org" , "Huangpeng (Peter)" On 2014/11/13 16:01, Markus Armbruster wrote: > writes: > >> From: Gonglei >> >> Signed-off-by: Gonglei >> --- >> hw/i386/acpi-build.c | 18 ++++++++++++------ >> 1 file changed, 12 insertions(+), 6 deletions(-) >> >> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c >> index 4ab44bf..8cec9aa 100644 >> --- a/hw/i386/acpi-build.c >> +++ b/hw/i386/acpi-build.c >> @@ -67,6 +67,14 @@ >> >> #define ACPI_BUILD_TABLE_SIZE 0x20000 >> >> +/* #define DEBUG_ACPI_BUILD */ >> +#ifdef DEBUG_ACPI_BUILD >> +#define ACPI_BUILD_DPRINTF(fmt, ...) \ >> + do {printf("ACPI_BUILD: " fmt, ## __VA_ARGS__); } while (0) >> +#else >> +#define ACPI_BUILD_DPRINTF(fmt, ...) >> +#endif >> + >> typedef struct AcpiCpuInfo { >> DECLARE_BITMAP(found_cpus, ACPI_CPU_HOTPLUG_ID_LIMIT); >> } AcpiCpuInfo; >> @@ -245,8 +253,6 @@ static void acpi_get_pci_info(PcPciInfo *info) >> #define ACPI_BUILD_APPNAME6 "BOCHS " >> #define ACPI_BUILD_APPNAME4 "BXPC" >> >> -#define ACPI_BUILD_DPRINTF(level, fmt, ...) do {} while (0) >> - >> #define ACPI_BUILD_TABLE_FILE "etc/acpi/tables" >> #define ACPI_BUILD_RSDP_FILE "etc/acpi/rsdp" >> #define ACPI_BUILD_TPMLOG_FILE "etc/tpm/log" > > Have you considered replacing ACPI_BUILD_DPRINTF() by tracepoints? > > [...] Not yet. I just think the change is simpler at this time ;) Maybe we can improve the file's log by tracing framework. Best regards, -Gonglei