From patchwork Sat Mar 26 13:25:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 554369 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp6439434mag; Sat, 26 Mar 2022 06:53:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwT7mg8DG8h0X7o9M+nOaaRG3+tMQ8lnnw2Tdk/2c9z+Dkj6SMw8EIQ2vUywS54jB/ShV6 X-Received: by 2002:ac8:45d2:0:b0:2e2:70b:f887 with SMTP id e18-20020ac845d2000000b002e2070bf887mr13852149qto.272.1648302785476; Sat, 26 Mar 2022 06:53:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648302785; cv=none; d=google.com; s=arc-20160816; b=H88ws+PxYI6a+jHhB4CTpiQS48gzK6n1KLlDo86pJUJWZxd4HB0qeQQ5W5TmuvugyS fiwsMLNQMufeg2x9tib931+eMVDTtQOWTMzDTreQ1py0e2s7i1K1tJrA0AZ89pAMPjLV eFHvCjN/B1iovMJTGtrISf6FbljE3X/lATZkvmqrBM/3qrmWtub46xF04In48LRDEklj Mhuchc5ppgzAe+MOQmnjRLOZdx3C/5iedVxIyG+GZvQ403VEMA5LcaJXfyvSz6NEtoL+ DiVD4qKOa07NZfI3bWavPDY9+wXLHyaO5Wi39APawEVUH9UVLj/SDWeKrQ7Z9PBgKvxJ QlPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=i47bs5CBOE5da9L+yyKjt/bVgLDqpLar0tLDMlVsDtQ=; b=SSryy7A7cSMvmKLROMaUWu+2JQcOvReWJyxLBF+4o4XSCIAH2Ewndm6Vn4l2A7+D5i dUdOhdn4kz1vnIgwkLw6sq4pU0cP1FsPcNEgPUnS9z62GfYL05REhgVRKWH6CGNPLXXG QsJl/2IgvRK9ad0lqE820PUoUpzJq2X3lmJyy6sFBN13mPNqUCbEs2PtDuBjIicUto+f 9Hv27FnCBvv8g+bZeFiBl9xmk0mlQRZrSpY7RArpp5kCs/0HMbEerWphkc4+09EoZjTd 7DI1U8U4JXDyt0EGxh3iyQW3sgpmkeGBrfKjQKEzahoFi0xk5nF2vVFusO/r92kGsTLX KrBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAu8kTcb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g1-20020ac84b61000000b002e20db39c9bsi2756580qts.157.2022.03.26.06.53.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 Mar 2022 06:53:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAu8kTcb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nY6qm-0008B7-Rg for patch@linaro.org; Sat, 26 Mar 2022 09:53:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nY6Qy-0007XU-GO for qemu-devel@nongnu.org; Sat, 26 Mar 2022 09:26:24 -0400 Received: from [2001:4860:4864:20::2e] (port=43745 helo=mail-oa1-x2e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nY6Qx-0005W3-5H for qemu-devel@nongnu.org; Sat, 26 Mar 2022 09:26:24 -0400 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-de2cb87f6aso10702848fac.10 for ; Sat, 26 Mar 2022 06:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i47bs5CBOE5da9L+yyKjt/bVgLDqpLar0tLDMlVsDtQ=; b=NAu8kTcbn09tztmTi28UI3LWvUPYTfZq37ZUq9q4LPv+l0pVnQ/KTxgivz/XmGxCty UaqslFrhY4pkVIWt1AVMRoBZljqKVi3RHVatcI0h63hxZPgbY76hjGXA2Omhk+OHmUo/ jx8B7u5ym1t9T/FVK23drvT2OJhviOv6qdKU61jytJu7yPg8rLR8PdUH08Rysruabc0V RV3j6wE00a7E8ttpAf9quEjgKvlaxvCVOm2QEv9sw/HPmAyP/SZdYOnQFsD/mS69ZlJs o/rDa2N8/i+r7xTnIF8AgCYeKdKoDiU0I9yI49sBgvHQ5vEOUmiVg3olhIalCg2ERhe+ W5qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i47bs5CBOE5da9L+yyKjt/bVgLDqpLar0tLDMlVsDtQ=; b=DIlttt93rtG59rtg8jD1VOdQjMkVKg46ld/1FXEbIKVj9mc/G0rITZh+lWoIJIhywR ZZA8sPYjqxT4ZU8F7xdrFAoTjwGGiBO/Bbw3k83ieV4ldT/ImpwD4iUVvMUtSefFBj67 hs0T7i2ykO4wzbD8sZCTsSGV4BOFZjIv8vSp4zhqSp7BhRB6k9SjEifkaxv8WTVeY2jL jX64papRzLkmcjASCzdzGzcnketjx/Ij73HdoxPavDM27OQfPnaRGQVKXO/1SxIDtTQK hENpaJfTlOwZLe8gIs0yNhX8NOzIr9T4mGFt3Q0eVM08bbeqEvkimYMmoukL6/fxrkxx lSLQ== X-Gm-Message-State: AOAM532nB2/dRmyum+tjRZMzSMPaEod2lKwxV/ZgUgibLzgMew44dXTm Qk3BA7VCjU/Xtg25Fl9YU+8ZQGKPUd/vDl83 X-Received: by 2002:a05:6871:5c8:b0:de:75a7:1a45 with SMTP id v8-20020a05687105c800b000de75a71a45mr6907895oan.181.1648301181841; Sat, 26 Mar 2022 06:26:21 -0700 (PDT) Received: from localhost.localdomain (168.189-204-159.bestelclientes.com.mx. [189.204.159.168]) by smtp.gmail.com with ESMTPSA id n62-20020acaef41000000b002ef646e6690sm4610331oih.53.2022.03.26.06.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Mar 2022 06:26:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 20/39] util/log: Drop call to setvbuf Date: Sat, 26 Mar 2022 07:25:15 -0600 Message-Id: <20220326132534.543738-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220326132534.543738-1-richard.henderson@linaro.org> References: <20220326132534.543738-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:4860:4864:20::2e (failed) Received-SPF: pass client-ip=2001:4860:4864:20::2e; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x2e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now that the log buffer is flushed after every qemu_log_unlock, which includes every call to qemu_log, we do not need to force line buffering (or unbuffering for windows). Block buffer the entire loggable unit. Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- util/log.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/util/log.c b/util/log.c index cab0642a7f..caa38e707b 100644 --- a/util/log.c +++ b/util/log.c @@ -136,12 +136,6 @@ bool qemu_set_log(int log_flags, Error **errp) logfile->fd = stderr; } -#if defined(_WIN32) - /* Win32 doesn't support line-buffering, so use unbuffered output. */ - setvbuf(logfile->fd, NULL, _IONBF, 0); -#else - setvbuf(logfile->fd, NULL, _IOLBF, 0); -#endif log_append = 1; qatomic_rcu_set(&qemu_logfile, logfile); }