From patchwork Wed Apr 20 18:05:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 563988 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp4410736map; Wed, 20 Apr 2022 11:24:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJSAbfzfwO2fNPBJ0dZo9g4GHY+Ze9lXUChdBq7HItjvC974OPGq7tnJnGmQXIA4NHhhAR X-Received: by 2002:a25:b9d2:0:b0:628:a85f:953c with SMTP id y18-20020a25b9d2000000b00628a85f953cmr20919027ybj.312.1650479061925; Wed, 20 Apr 2022 11:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650479061; cv=none; d=google.com; s=arc-20160816; b=FP7k9yvuc/hRo/25kUW3OCz0gG03OpZvVtNdE/+gDbNadtfcv3SC8/+VHxuuEG2m5W znECEiaiBy7hBaXE1wSpfCt21b9dY7gUIPEUYr46k6TxqsW0DkLDzEKE0Yzar+1IqmNe DF16v7D90oAAyCKWZoNkuslBZ7yqzSmB5y5DhBllzGoeQOy1Z26Vr3iHxSI+oTANmSVZ ZB68F1EjGqPmIucdYDyacC7ctrNhZi+gxec2TTgI0dX3WkWLHBfeuWDVItIn0lIfVeuI HSvo/QPDFKyYczX8o7Q+OXq9TAW3ZN2z3UQUN+pbOvsqrJ59mBu7vnO/SAkAs23jSSM0 GiEw== 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=Jh8l0ggXdEtDEXJ/qJx0UWqwH+qQZo23UKh5hwekfRk=; b=bYPSnd7ZTuFbQrqDZABdR08FkC5TcQQdG2a1+1YP3ibjNIF18CKgrnlzFSSG1vG7GJ mFcaVjtfht3Vjlf3NU/kLDV481JTjl2s1kJnmhdsxfhnHTTVBgzpEf8zuyH3dOmJXAVM feZb81jAGH5u4zsq2T83MGrQMbnUR1Wjb8oUaGI5fjh7fC305glETW5gTVe30IDa7L1t vAcviAjdCJTADpHPV9rJQE8Hldtqf9zdDeFse3pRga8/evRLeE3C5Bq8i4gTcA2+GwoC UupJ4/ADQeMLgAd+H5WRLq4jVhiKuJjYYTqlFfOEI8gmHCkELsBGw/lYr1J6zZgaisAj l/Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RrtAGNk3; 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 k4-20020a819304000000b002e5bb9dca6dsi632466ywg.246.2022.04.20.11.24.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Apr 2022 11:24:21 -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=RrtAGNk3; 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]:45380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhF01-0000KX-Dr for patch@linaro.org; Wed, 20 Apr 2022 14:24:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhEir-0005WU-Sm for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:37 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:33579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhEiq-0001D2-Cf for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:37 -0400 Received: by mail-pl1-x631.google.com with SMTP id c23so2554846plo.0 for ; Wed, 20 Apr 2022 11:06:36 -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=Jh8l0ggXdEtDEXJ/qJx0UWqwH+qQZo23UKh5hwekfRk=; b=RrtAGNk33qUEAXRwaMh7poGWOQpPtpvOqT2WFj+k9atO4TWhtr++Kt1Q4uhjALoIkK vqM8UMA6NLFZ9NoEeggT8KPgAYndEK0sVhSVXa2aPDh0+yElj4RjQfMX70nlhJj8PNpJ dm4U3ZoRJzkDQxS7t46oArMqK2vUaZCGMxCgKxdVkMYWLHoIJIsXR2lMiZmJpeP1ueH9 mOym8ZVfHH1EWM+A0w92fjQGxW05lLvgcCvG1JHd21xtTSf+t0U6RCFJdrUWiH/++1U4 H+7EapBMSUCJOeJMwQcRxnihSSGiJkUwP1y+LLQ6Pn6c1B/mFdfIWt4LGIfVT5zGp0wg xoUw== 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=Jh8l0ggXdEtDEXJ/qJx0UWqwH+qQZo23UKh5hwekfRk=; b=bmDEulBww5RqDhShMZ287xpDxAS7zzjRPdfFZWal2601cvBa4Embzy6RCulj2kpTs5 JSYbnl2Rmxun4dC0vORGjGi9SoIULLEH9OFabQ7IW1uTg4ITNGG/w5rweUZzC7HsO3FD IHRQev9qKzobbxmg96o+pUUmEoEfeH9w5RqIivEiR1rquIZXqAajn85u3GwWY9+MpeVs GGjL04clS2YAAL5MVIKaMJXp9ql7IWs0tTgclps16KeM1UavtrE1jTrlK7vHon3f2p4P KTW/J9b/tKA41L+HRsj6OES/z2yb/Q0WZD2HVC8QVML2GGdr1Pb28HQyNqedKHXt3X9y eurw== X-Gm-Message-State: AOAM532yqcK22EEakJ3fk+eh9OA5rRZUs3irVBjG/oOp5aNwCMPB4iAO zvzE3itl3lnYrV3nxXKUrTIIMU/+kMZbiA== X-Received: by 2002:a17:902:7442:b0:158:a253:b4d5 with SMTP id e2-20020a170902744200b00158a253b4d5mr21731277plt.94.1650477995160; Wed, 20 Apr 2022 11:06:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:06:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 14/39] accel/tcg: Use cpu_dump_state between qemu_log_trylock/unlock Date: Wed, 20 Apr 2022 11:05:53 -0700 Message-Id: <20220420180618.1183855-15-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::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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" Inside log_cpu_state, we perform qemu_log_trylock/unlock, which need not be done if we have already performed the lock beforehand. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-Id: <20220417183019.755276-15-richard.henderson@linaro.org> --- accel/tcg/cpu-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 8b7f9a3065..635aeecc0a 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -224,7 +224,7 @@ static inline void log_cpu_exec(target_ulong pc, CPUState *cpu, #if defined(TARGET_I386) flags |= CPU_DUMP_CCOP; #endif - log_cpu_state(cpu, flags); + cpu_dump_state(cpu, logfile, flags); qemu_log_unlock(logfile); } }