From patchwork Mon Oct 26 09:10:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev" X-Patchwork-Id: 535757 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 83C9D140E31 for ; Mon, 26 Oct 2015 20:11:28 +1100 (AEDT) Received: from localhost ([::1]:51295 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqdoM-0007hO-Kp for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2015 05:11:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqdnc-0006ay-MZ for qemu-devel@nongnu.org; Mon, 26 Oct 2015 05:10:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zqdna-0001cZ-FZ for qemu-devel@nongnu.org; Mon, 26 Oct 2015 05:10:40 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:46308 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zqdna-0001cC-1n for qemu-devel@nongnu.org; Mon, 26 Oct 2015 05:10:38 -0400 Received: from irbis.sw.ru ([10.30.2.139]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id t9Q9AQTu014460; Mon, 26 Oct 2015 12:10:35 +0300 (MSK) From: "Denis V. Lunev" To: Date: Mon, 26 Oct 2015 12:10:21 +0300 Message-Id: <1445850626-29407-5-git-send-email-den@openvz.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445850626-29407-1-git-send-email-den@openvz.org> References: <1445850626-29407-1-git-send-email-den@openvz.org> X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x X-Received-From: 195.214.232.25 Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com, "Denis V. Lunev" , pbonzini@redhat.com Subject: [Qemu-devel] [PATCH 04/11] trace: no need to call trace_backend_init in different branches now 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 original idea to split calling locations was to trace tracing thread in the final child process according to commit 8a745f2a9296ad2cf6bda33534ed298f2625a4ad Author: Michael Mueller Date: Mon Sep 23 16:36:54 2013 +0200 os_daemonize is now on top of both locations. Drop unneeded ifs. Signed-off-by: Denis V. Lunev Reviewed-by: Paolo Bonzini --- vl.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/vl.c b/vl.c index b1ddd3f..7ce9d70 100644 --- a/vl.c +++ b/vl.c @@ -4083,10 +4083,8 @@ int main(int argc, char **argv, char **envp) qemu_set_log(mask); } - if (!is_daemonized()) { - if (!trace_init_backends()) { - exit(1); - } + if (!trace_init_backends()) { + exit(1); } /* If no data_dir is specified then try to find it relative to the @@ -4635,12 +4633,6 @@ int main(int argc, char **argv, char **envp) os_setup_post(); - if (is_daemonized()) { - if (!trace_init_backends()) { - exit(1); - } - } - main_loop(); bdrv_close_all(); pause_all_vcpus();