From patchwork Fri Jul 5 08:40:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810379 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1509380wru; Fri, 5 Jul 2024 01:48:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVS6d9MLgz3ffw/K/5mtWbSVQRNHLvV6AapHUJRfDMkZeEwjW+utcxygk1OdKpj5jT6B6xreMNHtrdu8HIjSQk6 X-Google-Smtp-Source: AGHT+IGtZlAbYQf2Q8dleqVDtTcCXrTfK2C65LMVdHGkb2MaFq0YdOQXxUkBO2df04ShWg6rXkRy X-Received: by 2002:a05:6000:145:b0:367:8fd9:db6d with SMTP id ffacd0b85a97d-3679dd1029amr2668077f8f.10.1720169326840; Fri, 05 Jul 2024 01:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720169326; cv=none; d=google.com; s=arc-20160816; b=H0YWvUvKlTI9RUYCsCNgMbbSmjIjWfRwMDb9Y3hUwva6W2X3IUllCdAHL5djiSGQqJ kcQVGTNCvT2JhOpV2A5lK0oMA3hnsLl5izPkbC7VT801sqL2XTPKjd7RoIJui9rkhES/ QzHv78GaWk0bOPximq2uWW9Im8E8gYYU2FoBoHC3Rh8QVmMiT+k/dzgZQVqwwgC3ENrT naN/jcpnYXbzwltHV1bN7WAGuMa0h87QW8RE0/FnHR6+SPfZU6CYPygdo7i7UrvpEign tC6uf/W+Wx0d/hp1GWnaREG4WpwyIVp9TAsOEHLH1X41n9iZAPAxoKEXxIOZx4f5bDlW XTog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=MXuTP0GCGD1U2EC0jCbVCWmWTWrrWZHqHe3306YwCaE=; fh=fOmDb3LWEc8YYk2jJaPNBibuO+xI4aDvcJfVffKo+VU=; b=q1yZZUOBfvAWaDp8wGVUt1DJoBCS4fBQwZFGQYAFmKknT1+9Vaeh6eX3fy1ZrLpx7F b4RaRSHRzKczLCXhbi7e5LeEgTTSOlOnAj6eulDryoDstGakzWBcl30z5EnolWdkSP1A Sk6SeS53fVghlsmHmDPisz3WYQAY4VE6v29ZjRbzKXdxvMxHJTfUuZ/52U6HpTZXDJ5y btgfhVfyA6Sezcy6Ct8G23wJKdiFyHGBuCNj8GF4aND9GnQ3D6A09SFCqxr1EhMsLoOz kQf8dYT8hVNYdVQ49N78cET0qI/PCKNI3Yy9m/p/YRGGRuio19J7Xhpl8esuhDYOH3bL qEqw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RRZnb2GU; 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 ffacd0b85a97d-367997aafc3si2100075f8f.9.2024.07.05.01.48.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 01:48:46 -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=RRZnb2GU; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPebr-0001Wu-Vk; Fri, 05 Jul 2024 04:48:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPebO-0000yB-6D for qemu-devel@nongnu.org; Fri, 05 Jul 2024 04:47:35 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPebA-0004Bw-QO for qemu-devel@nongnu.org; Fri, 05 Jul 2024 04:47:33 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-58b966b4166so1703069a12.1 for ; Fri, 05 Jul 2024 01:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720169238; x=1720774038; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MXuTP0GCGD1U2EC0jCbVCWmWTWrrWZHqHe3306YwCaE=; b=RRZnb2GUQhy61z+qWf+Rx3ER0q7PL+L7miqdTgAKbVUUsb30ASE2wamM85iLjy6jo+ k/gCHsLO1Ycv5kMDgdIO2zA+yvnoEQ46qcxH14LUIAZ6jWmsOdpxdS33wbNauJtiu8ty 59zLi2RAI9PFmlWgz6IE80fVkbNKvFHO9J4ljUX2G/HwQ1yRqLPv7Uuf5YWYUn7ocPK9 3EV6gu5zZXE64mNDTQ49qgWU1s0hidDu4pVuQ/vylfGK60YC1BYrHJbB3kIUTdwoCVc7 Z/uUiqKYWCURfEDAKSnB1KsIKKkzswNdLRiPiq8o0kf1TtH2L3Rb56jaMRjO1lAl3+JX jtDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720169238; x=1720774038; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MXuTP0GCGD1U2EC0jCbVCWmWTWrrWZHqHe3306YwCaE=; b=e2TB7zJc8ykOE/nCERlhiko7CaRv9FupP1VLaVYZJbIYUyojZ+ITAZFe0qk79c6DrE oXUFf29pXI9AIBqkUcnbabdEOafNHzlTq0YxbjY2MEzvAUGL5l5rCTj5vnmjeDpI1JHe eahPWsWOnSGH9B2grudIQPDyyRLS9YB7IT0bPmNNmAig2fHxcJwe91OSjlEQ519k/Dsd RYTwdSWO0IWXGuptFvx55VlheZ9C/SKO16o/wLGzNNBc++G5Im3wmqoS6dn3Zb+PjZbN 04MqafKpJZmxE6sp92NlXklM1DZXvCiTGlkmiqSizUh8j09toXYACC6fIlb2adj4Ew4h CBig== X-Gm-Message-State: AOJu0YxyLOPqpxlZuhwPPDnkzKM0q59ycjYjuuls9RCYABZsaRwpTnCX WKD3zDr6h5wrTyE3c/0ifqIM+YQTrjZzh2IXZO/ukZh25557FSIIeb5/2S5Qbco= X-Received: by 2002:a05:6402:2105:b0:58c:2a57:b230 with SMTP id 4fb4d7f45d1cf-58e5955a333mr3220448a12.13.1720169237559; Fri, 05 Jul 2024 01:47:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58fb3ee74f6sm493139a12.68.2024.07.05.01.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 01:47:16 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 37EA062152; Fri, 5 Jul 2024 09:40:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , David Hildenbrand , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier , Alexandre Iooss , Thomas Huth , Mahmoud Mandour , Peter Maydell , qemu-arm@nongnu.org, Aleksandar Rikalo , Mads Ynddal , Yanan Wang , Eduardo Habkost , Peter Xu , Richard Henderson , Marcel Apfelbaum , Paul Burton , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Subject: [PATCH v2 26/40] plugins/lockstep: clean-up output Date: Fri, 5 Jul 2024 09:40:33 +0100 Message-Id: <20240705084047.857176-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705084047.857176-1-alex.bennee@linaro.org> References: <20240705084047.857176-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.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 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were repeating information which wasn't super clear. As we already will have dumped the last failing PC just note the divergence and dump the previous instruction log. Signed-off-by: Alex Bennée --- contrib/plugins/lockstep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 353bf12dfb..5b7dfc9c06 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -135,10 +135,13 @@ static void report_divergance(ExecState *us, ExecState *them) /* Output short log entry of going out of sync... */ if (verbose || divrec.distance == 1 || diverged) { - g_string_printf(out, - "@ 0x%016" PRIx64 " vs 0x%016" PRIx64 + g_string_printf(out, "@ " + "0x%016" PRIx64 " (%" PRId64 ") vs " + "0x%016" PRIx64 " (%" PRId64 ")" " (%d/%d since last)\n", - us->pc, them->pc, g_slist_length(divergence_log), + us->pc, us->insn_count, + them->pc, them->insn_count, + g_slist_length(divergence_log), divrec.distance); qemu_plugin_outs(out->str); } @@ -147,10 +150,7 @@ static void report_divergance(ExecState *us, ExecState *them) int i; GSList *entry; - g_string_printf(out, - "Δ insn_count @ 0x%016" PRIx64 - " (%"PRId64") vs 0x%016" PRIx64 " (%"PRId64")\n", - us->pc, us->insn_count, them->pc, them->insn_count); + g_string_printf(out, "Δ too high, we have diverged, previous insns\n"); for (entry = log, i = 0; g_slist_next(entry) && i < 5; @@ -163,7 +163,7 @@ static void report_divergance(ExecState *us, ExecState *them) prev->insn_count); } qemu_plugin_outs(out->str); - qemu_plugin_outs("too much divergence... giving up."); + qemu_plugin_outs("giving up\n"); qemu_plugin_uninstall(our_id, plugin_cleanup); } }