From patchwork Mon Dec 11 09:13:45 2023 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: 752517 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1199802wrs; Mon, 11 Dec 2023 01:21:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiXCu9djjS2f8YTDnezFQ6XwUGq90/uZPXlWb9GaTSjF+UhQ6dNk5pzIOo2IINHUcuTUYO X-Received: by 2002:a0c:d844:0:b0:67a:cb1a:ad63 with SMTP id i4-20020a0cd844000000b0067acb1aad63mr3949448qvj.16.1702286509647; Mon, 11 Dec 2023 01:21:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286509; cv=none; d=google.com; s=arc-20160816; b=q5E7DbgLSWo+B/KVYiiH0p25c9LcFtZfTsAJEN3rU/39nFPO+vLEkGG6OJt2fjFWgo 34Ss2jPYh3+RUqFiBL8TOg+HyWtTjy3HQ33Peg7rRhIBcDkvhxSdrUWvXevfD1Aho6Ux PP0vJI15lOROZT1IwdT82djwRoexLq4s3HCdId7CU8a6+0BRCFfsk93kNN2Q18CATP0G +eim3IUe6KSlKAMNo0SmYXWxYj18qey9TYsFaqDmvXEqj7RDWStT1XA/Wz17ac/zETA0 E1tCQ851sTVRdHO58zxGUHpKxcFQkhBAQ71ZAwUluZZx4DPPXrzPQNwa20O88BpnpZgf cw7Q== 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=djPxrJrlceejDSikdH1s/unMablwdP1SJY1GE8A/HP8=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=MRFxTQrVl139/oeX74BmEfcN0zDlOKVRdJXTmoNewgsauJ2ENqfDMFxiwBMtGDJOhO T9A7Pa0ja6VkdWsNB1kCxk3OqGfHavw+h50jWkacsERWxGZYlX+LqdKrObvD5ZckqkOC 2IijMA2da7dzpzTMZh0+k2SXu0l/BSL5OvBNVIfnNAu6rGNAqXENKY//1W4hDEJYZgz8 TkOUO3cmJ0Fkq7GEj/be873loGG1r3L9QlOeiA2RZuOdvnEmCnHqnPIPz7FpYWOaNQxE ZxgyRVE+zIDN83FwhBUAwWIyXKcy9eGHpxPsGV81DMqhcwXv0Xk7sUZnrqwpWtGZThzc G8kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ESWnbTPT; 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 ml2-20020a056214584200b0067abe0ce0d7si8048498qvb.587.2023.12.11.01.21.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:21:49 -0800 (PST) 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=ESWnbTPT; 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 1rCcTL-0000Dh-Id; Mon, 11 Dec 2023 04:21:07 -0500 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 1rCcTJ-0000Cm-Cz for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:05 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcTE-0005vI-Ci for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:05 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-336223afe64so521725f8f.0 for ; Mon, 11 Dec 2023 01:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286457; x=1702891257; 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=djPxrJrlceejDSikdH1s/unMablwdP1SJY1GE8A/HP8=; b=ESWnbTPTA/e3HA0NImMaifftJdpRargnNUqzIDKrgCawsaCiWdgA8lq+vqc7zR2kG6 uJOyE5w2oMJr/Cl8HWRQDrCZDhUd/U+wc31jZhtS9V8kfg2/JMEVEJeQGsNMinENnyNr HcXHnj8gnIdF/WH/PkWIn7WSw7nS1sXgn8QKYJeWs+lIkCj8dmRG/OEftnE2gzvdElSN ZxeiXsciZrm1qOqZ08iKlMJ24wjOtJKz34kGhNrxdhT/gTq/khchVtrlE7MX8/cAUMJl HVwCIYrXChwoNlhLad7Mw+1AZ/Nj8192g0lpN/C4tXXxJrAdzSxY8MIvKhknE8cQM/Lb oBGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286457; x=1702891257; 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=djPxrJrlceejDSikdH1s/unMablwdP1SJY1GE8A/HP8=; b=TonNVePWKy4E2vQKeuQW4EW3eYOfVlA9l9Tf+ThaCMauSpNRQ6Alloo8etOKeT1gSR 2hQxwfWSxkvjHcdQ2UvYo6fP/WAvEu+8aya6EZ4ZMIUEeOwtbgGhx/0nB1kjZsUyKIcC hZxBheALdKA7t1eA4JmFobJmHEDGvWT4CWJPMWV2PSwPruLgqYoYeR/FG+l6zgvVX/Xi Fo+EwnVTOYtgxx6m6Z7jHFMRAc77kuFKFg8T4SDQt3DvBIQ1gup1wFZ+LiVaqp30L8X6 jATiAD6VC6ixY9h9PM1NC2uWj0wTn+hBlTX5Y75ATj9pmUuKoG5VRKG5IjzklsWjFA++ Rzww== X-Gm-Message-State: AOJu0YzdIU/VhzsOs5GU1T91y9vDQxTqdqMaCiqzOl0f6EptwQBIuDq/ EvcPgJCsUGJgXFHAipwqTwV69w== X-Received: by 2002:a05:6000:110a:b0:333:5258:68ef with SMTP id z10-20020a056000110a00b00333525868efmr2461607wrw.68.1702286457301; Mon, 11 Dec 2023 01:20:57 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o13-20020a5d670d000000b00334b35754bdsm8087864wru.24.2023.12.11.01.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:20:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7D44C5FBFA; Mon, 11 Dec 2023 09:13:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 16/16] replay: report sync error when no exception in log (!DEBUG INVESTIGATION) Date: Mon, 11 Dec 2023 09:13:45 +0000 Message-Id: <20231211091346.14616-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org If replay_exception returns false we can only trigger an exit from the main loop and hope something unwinds to something we can process. This seems to be the point where execution diverges in the replay_linux tests case. DISCUSSION: Maybe this should be tightened up to check the remaining instruction count? Signed-off-by: Alex Bennée --- replay/replay.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/replay/replay.c b/replay/replay.c index 665dbb34fb..d283c1353d 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -209,11 +209,12 @@ bool replay_exception(void) return true; } else if (replay_mode == REPLAY_MODE_PLAY) { g_assert(replay_mutex_locked()); - bool res = replay_has_exception(); - if (res) { + if (replay_has_exception()) { replay_finish_event(); + return true; + } else { + replay_sync_error("Exception not in log"); } - return res; } return true;