From patchwork Wed Apr 20 18:05:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 563979 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp4406470map; Wed, 20 Apr 2022 11:18:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwogqz1Y+FgO+Ld8LKpZqFsUI91LOXNwOyOuTLQBYAzd5esOuQJ9xVqPQbLnnr2JkJ7A1ex X-Received: by 2002:a0d:c685:0:b0:2ef:6aaf:5358 with SMTP id i127-20020a0dc685000000b002ef6aaf5358mr21565079ywd.453.1650478680688; Wed, 20 Apr 2022 11:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650478680; cv=none; d=google.com; s=arc-20160816; b=sJluwIspjy9YzKDHtvZFcaMR6qnoAyPLpVhu+dNZb9HrRcOvVKsgreR/2A2dqzm9Kd Z8764Km3jqQmfKRzAUeil7jP6+4ZUPYvKaEjy+H9pjJu2Pi0VlL+G/PzHvVk1KVxYQWO Oo8DRjENFoPJ5xKINHUF96O6iOuuv0TrPuF0DSh+6cS9zn26inoVlj2MKO+sYNRaVZsQ J7JZ9/4bNgcKK1Hcw/3XeBKtBljcFKGz23YSKsdv9t8yI44E9ozU0TiP+rf6DC6u9wJy raDrX5GuO4Mes2bqrlxeUggEKktiDIyQ12KNljAvXGaPR5KU6Gpcev0tmq5iqRVfi/7v OqYQ== 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=OUIcQ5zLACIhYX2zcEvzffhtx00mXb1YP/5lTmvaplA=; b=dTgL+keU5aKSKCvI9ohr0Ni0JVWw81s6IoQ2409YZRFWLXXQC63tO90tMJQLsnXL9w XPAT8F7aO+Y3gd9GanEmookl/dTKEBjZ0dx/xMBnUGT5tCMSCloHWqCXjZ8FaC3/P5dz u958hjxZ9CqcujeRKjNbb0UWMc3K0GUAwh/7yxs2B/a0oabakPtLSOBYUs8N4UsXs+4b baoPS8TcWY6mwq5uofKoupCYS4E/UbAf3n4ulog+It+BnCxoXfZ/em15ZSfI7cWnbdYa uuXXexvbBF27UaKlXt2HAgYdg3y5cKrkmG8L0hfXfSTfn3D10sv/wAF5OTep22WrNG69 DIBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aK+ss044; 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 206-20020a8104d7000000b002eb6e3309fbsi560500ywe.375.2022.04.20.11.18.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Apr 2022 11:18:00 -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=aK+ss044; 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]:54678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhEts-0001uJ-4z for patch@linaro.org; Wed, 20 Apr 2022 14:18:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhEix-0005ol-UT for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:43 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:51789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhEiw-0001Gh-AO for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:43 -0400 Received: by mail-pj1-x1034.google.com with SMTP id bg24so2682119pjb.1 for ; Wed, 20 Apr 2022 11:06:41 -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=OUIcQ5zLACIhYX2zcEvzffhtx00mXb1YP/5lTmvaplA=; b=aK+ss044hIrbHPFycrlaZHSQllxWTmwHu+PL/6aLVb+nxPtBrqMOUOMEpIcHLwUSif 51Cu7OcLdWR3teX6O8Aute/Acqh2hrI777tRWW/flQvSaaZA1QAD5MvaLlPEx737us9V g6PwldBWVtwaivQdzzqrsmUMFqnZJPQ2rKbMhZat49UIFx75gyy4zsKYPOX8oLwofPZ/ RB4fJEbB24ZT6+clOFE4Cd4tNjRfJS4je331H3/s0GRCDgYFOxoyU2gNIe8XHWQDez/1 p1CBesRcuvB3OFvQPc3gXkk8BMIunNeROIaLRJ3l1yLdAZJ44DZ/Z/Z6UcoKONTedQnp QkgQ== 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=OUIcQ5zLACIhYX2zcEvzffhtx00mXb1YP/5lTmvaplA=; b=WNr5TXx0zrqNpFLwjKTPjgw+nWp2b+MijeZ2wyPW2dl6BItPhL1+O5CnX+QJxHwU8i cmxb/42meFR8pHqC9aFZ9VJ2trO5J8eI37WSMEPWy9ER+1W93/h43bGdQQFwAGABQuGp ozBP5CD2OyfgFFolZ6yooDsFAVa9Oh3Go0vsfkKZn4znxssMiavdH+WfwUBP6+zkHUBo LWTaBYBNisrjsDy0J88kNfvHtUITUAbR3oJjIeM0c0394M5dFwMpZeqvwqclPFBhrFpR eBiV9ALGKqqCqslsS0uUDq/Rz3aNQ5sOlIGREFq/DQHrTD9mNnnQF9/019pWKp6ZKji9 7h2g== X-Gm-Message-State: AOAM531PpLqy31GeUR07Mx39c7C4Tz5P4DQwzBr53qDzO0qmIclo/IDb iudbuXlv2Q6gX+No+f6gEf5C994RcRkkGg== X-Received: by 2002:a17:903:2487:b0:159:bce:4e1a with SMTP id p7-20020a170903248700b001590bce4e1amr12183733plw.4.1650478001099; Wed, 20 Apr 2022 11:06:41 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id i2-20020a17090a058200b001d2fc489b8asm56681pji.25.2022.04.20.11.06.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:06:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 20/39] util/log: Drop call to setvbuf Date: Wed, 20 Apr 2022 11:05:59 -0700 Message-Id: <20220420180618.1183855-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220420180618.1183855-1-richard.henderson@linaro.org> References: <20220420180618.1183855-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: =?utf-8?q?Alex_Benn=C3=A9e?= 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. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-Id: <20220417183019.755276-21-richard.henderson@linaro.org> --- 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); }