From patchwork Tue Feb 9 16:49:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Denis V. Lunev" X-Patchwork-Id: 580968 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 92E5E140BA7 for ; Wed, 10 Feb 2016 03:49:44 +1100 (AEDT) Received: from localhost ([::1]:58066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTBTy-0000lp-JX for incoming@patchwork.ozlabs.org; Tue, 09 Feb 2016 11:49:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTBTc-0000BW-IB for qemu-devel@nongnu.org; Tue, 09 Feb 2016 11:49:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTBTW-0007jz-NY for qemu-devel@nongnu.org; Tue, 09 Feb 2016 11:49:20 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:38525 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTBTW-0007jA-BA for qemu-devel@nongnu.org; Tue, 09 Feb 2016 11:49:14 -0500 Received: from hades.sw.ru ([10.30.8.132]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id u19CbvHd024082; Tue, 9 Feb 2016 15:37:58 +0300 (MSK) From: "Denis V. Lunev" To: Date: Tue, 9 Feb 2016 19:49:05 +0300 Message-Id: <1455036545-14870-1-git-send-email-den@openvz.org> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by relay.sw.ru id u19CbvHd024082 X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x X-Received-From: 195.214.232.25 Cc: "Denis V. Lunev" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini Subject: [Qemu-devel] [PATCH 1/1] vl: fix tracing initialization X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org we should call trace_init_backends() before trace_init_file() for CONFIG_TRACE_SIMPLE There is no difference for other cases. This problem was introduced by the commit commit 41fc57e44ed64cd4ab5393d83624afd897dabd4f Author: Paolo Bonzini Date: Thu Jan 7 16:55:24 2016 +0300 trace: split trace_init_file out of trace_init_backends 'make check' was failed as a result if configured with --enable-trace-backends=simple Spotted by Alex Bennée. Signed-off-by: Denis V. Lunev CC: Alex Bennée CC: Paolo Bonzini CC: Stefan Hajnoczi Reviewed-by: Alex Bennée Tested-by: Alex Bennée Tested-by: Christian Borntraeger --- vl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index c581e39..ffaf8b7 100644 --- a/vl.c +++ b/vl.c @@ -4098,6 +4098,9 @@ int main(int argc, char **argv, char **envp) exit(0); } + if (!trace_init_backends()) { + exit(1); + } trace_init_file(trace_file); /* Open the logfile at this point and set the log mask if necessary. @@ -4118,10 +4121,6 @@ int main(int argc, char **argv, char **envp) qemu_set_log(0); } - if (!trace_init_backends()) { - exit(1); - } - /* If no data_dir is specified then try to find it relative to the executable path. */ if (data_dir_idx < ARRAY_SIZE(data_dir)) {