From nobody Fri May 10 10:09:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1602592102; cv=none; d=zohomail.com; s=zohoarc; b=FpRz8FOeHaVmM926r6PTARvaNGZk5/hpZ+vUPHP9SgNAap52Dy7I7j7nEDf1q9bP/+XgsvDfBDswMPbGXfohEwRL7w1rk68E654oHLFxv2vkEZcfrdu50cCluF1//Nhxwtt05gr3LhWY7Sc0hK9Tz4MDuV7GhhZevAnDr3Yq1WE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602592102; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=h5VN4Q20awkDDa5DusJocR61578qcAgu0ciOdFIb8TI=; b=Aw0VR7XkkGfITTnPfqobyHCBTUIzyBc5dG4s72ifF+plXINZg4+zY13LR1z6A2632wj1RRej4G05T1EZHWLDoK2QxG6jzq/z7OJN3i+pFTSWKKKE3j6vlIKvciPKi9JS6Anmdtuc7kXmIBD676vN/fSmlKvi0r+1nYUCXQyN+Mo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602592102833633.5280304717046; Tue, 13 Oct 2020 05:28:22 -0700 (PDT) Received: from localhost ([::1]:55014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSJPg-00089H-Vb for importer@patchew.org; Tue, 13 Oct 2020 08:28:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSJOW-0007IL-6X for qemu-devel@nongnu.org; Tue, 13 Oct 2020 08:27:09 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:33597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSJOQ-0001f3-Q4 for qemu-devel@nongnu.org; Tue, 13 Oct 2020 08:27:07 -0400 Received: by mail-wr1-x429.google.com with SMTP id b8so10587820wrn.0 for ; Tue, 13 Oct 2020 05:27:02 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i126sm28583582wmi.0.2020.10.13.05.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 05:27:00 -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:mime-version :content-transfer-encoding; bh=h5VN4Q20awkDDa5DusJocR61578qcAgu0ciOdFIb8TI=; b=RvxmzsGHeLjXHIiTudA27WRqWOs07OQMe/uNt4aiIB+SJvoXWepG2bZ7oko4UPsKBM abZnLGBwfoBNMPxSqRW34UFHJpZKvdA+wmoHzUbpGeFfX10pvTR7Aafrq351B2yty7mZ uRVYNQoCN0NqMplC9fYbn0QO8xVv0NH6cVR/Hd7bJpITbPAKH2DW6mx9WYPMWWatDQrv DYYlRLMHPHJhHvtJ9jhLbKoQx0STzvT3DTLmuugNivnnmFH375PeLl03ZNj9xgR4qP/G JxbToE2oE4bX+3WQw6IwhGfXbeElSsFvDhtgkyMfBnkGT8/fK1ALake1yhuPLDrnA1+v 9PCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h5VN4Q20awkDDa5DusJocR61578qcAgu0ciOdFIb8TI=; b=mYlph3dnj/nKCfyB1qJx7lVQ8wT/zhZGardHB0WRnl3GDYcQcGZHMLzlwm+QqfzmgT IBB+g7egOuqJhdwXnPIfGk8z/fgx0s478ohErbIPnXGnpM7W4Xp+R5W0/Si/vlJxPzB8 s9tj98DSPUSMeeqfDaTSuoSO195ME8SC7uITdUiMQXcHctI1uzu6DJ5jm2gPMJJvnzsL 3Ct6GQd0WKlNP+vOoGubisDa0ykCywOo2ukN8/SOaoJPuLyB/BkqCoA68uAfGNXvr8T2 0Zwz5C8R8FBDtSu/X+B/DsRcX+MOIUqZf3gY/PQo5xezFSB4kuVPuICNhRZiP9UHxLm+ DjAA== X-Gm-Message-State: AOAM530gtnbzou5JN+zWNh0cZ2oEKZY6V25r7aAqFDsqffd+zYtFtiFL Ez621uNfsMoS40tpZ8QbKXAqQ11eeVEnqwpR X-Google-Smtp-Source: ABdhPJzHIcwg8pNyeApvLJUjCAELdSbsSeZRr9zyAZJYZrJKUfhgqiAaYQIPpvtGOIgXc/dlsVSZTQ== X-Received: by 2002:a5d:6345:: with SMTP id b5mr37073014wrw.288.1602592020817; Tue, 13 Oct 2020 05:27:00 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH] accel/tcg: Add CPU_LOG_EXEC tracing for cpu_io_recompile() Date: Tue, 13 Oct 2020 13:26:58 +0100 Message-Id: <20201013122658.4620-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When using -icount, it's useful for the CPU_LOG_EXEC logging to include information about when cpu_io_recompile() was called, because it alerts the reader of the log that the tracing of a previous TB execution may not actually correspond to an actually executed instruction. For instance if you're using -icount and also -singlestep then a guest instruction that makes an IO access appears in two "Trace" lines, once in a TB that triggers the cpu_io_recompile() and then again in the TB that actually executes. (This is a similar reason to why the "Stopped execution of TB chain before..." logging in cpu_tb_exec() is helpful when trying to track execution flow in the logs.) Signed-off-by: Peter Maydell --- accel/tcg/translate-all.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index d76097296df..4572b4901fb 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -2267,6 +2267,10 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retad= dr) tb_destroy(tb); } =20 + qemu_log_mask_and_addr(CPU_LOG_EXEC, tb->pc, + "cpu_io_recompile: rewound execution of TB to " + TARGET_FMT_lx "\n", tb->pc); + /* TODO: If env->pc !=3D tb->pc (i.e. the faulting instruction was not * the first in the TB) then we end up generating a whole new TB and * repeating the fault, which is horribly inefficient. --=20 2.20.1