From nobody Wed Apr 16 16:15:28 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603817672; cv=none; d=zohomail.com; s=zohoarc; b=ExYWts1QcZQrI2vAUnQCfwXs5SEljmpTmFYMvEGm5QQ7W/a1o9gwW8KIMGglLAJMy+l3lKY4c7NI4STLKEFqddp59RBjQhUxWK15ieWWePwjlg2QsmI1KH/cNZmDqbdDLXTbOHPCsfblDy/PenIFtbEbyRusdoW94o+yaBQNRG8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603817672; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SJ7E8JqgOLx2ZEpYUNi3ic5vKG5NWEQV9qbwhc56KHQ=; b=hBaD7BDDDPWLQK4oFDxIpZQ4bMdd1CRcC+AZLC8ZYVbEIB0jfccREGD+4Y7ZYxqbaRVSOnwSmRA96qLZ1EavxE5vnXRUMeXTREX9cIYszLTzTBVlGBPs46XdC+SyGgGXSwWIAXMFCyqP2eAtK0dfS2naQ23zCZJIYCGcsixJvlk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1603817672366690.9717691784236; Tue, 27 Oct 2020 09:54:32 -0700 (PDT) Received: from localhost ([::1]:37820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXSEx-0006ha-9I for importer@patchew.org; Tue, 27 Oct 2020 12:54:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXSC0-0003NR-BU for qemu-devel@nongnu.org; Tue, 27 Oct 2020 12:51:28 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:43264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kXSBv-0004Ro-Je for qemu-devel@nongnu.org; Tue, 27 Oct 2020 12:51:27 -0400 Received: by mail-pl1-x62e.google.com with SMTP id o9so1054465plx.10 for ; Tue, 27 Oct 2020 09:51:23 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id q16sm2955283pfj.117.2020.10.27.09.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 09:51:21 -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=SJ7E8JqgOLx2ZEpYUNi3ic5vKG5NWEQV9qbwhc56KHQ=; b=fPualdzQSWBq+Cbb+/WPwqu/ApZ1ZDK3IVAnh8cfGam3aUKZ592jzZtZvdXO3eH39J eU61iCSp6ptAYZmuYHTs6TnU/rRNh/0a5nKtuSHWlNPqRJTyaceiB0GZCg2A74VnKhSY e9xyNDrfPSFKdhYJ0Rl+H7Vn9l1tCAp3AJfvhscLpC3NTHW1sRn4u8l1SMZPHuk3tF7q RwFwZiYTrZTJByUJl1URPrscDwdRbChqOaAfMaBH7aKjki1lox0/wke/1bAqvoVn75IZ 9iDe06s9ctSNvXJaAHQFEN3O5ghfLmBbB8oyMcyr5Z1wINnXLiTliopdWr2Wo0xwNTqD I2Vw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=SJ7E8JqgOLx2ZEpYUNi3ic5vKG5NWEQV9qbwhc56KHQ=; b=KVzFuCKAAdmd9qmHu2DdDwHugrSBpKZsfclWv4KInlAtCEsKWEScFKgTcU3BI8DDOP IuVHpmWk1Db/UKIi0XgDpffYGLzmb9fvpRvx/Bf6I1EnMzaTPvwXRcWM20dBFAqnIMlG h4aNUyr8cM6lPGJPNSAQ49M0I+VTNV/D9w8bHJ1YuaTqYUEaDVm7x/+wT+0of5JZpUE5 SCswNzo9XTdiCA3Jb7xhh6ea4nATMZ+BemNiMO19c6h+XEmuI1IR2MvtcF7mcSAvMA4O jNGNlgJRacS/s71Z/mV/kbT5ty47j+jKifKgmruSJN9SHyruU2zpxti/LWDo7OIxjKbe dTcA== X-Gm-Message-State: AOAM5310KFO+In8uwdhXvoGGN6F9rGTHJ0oPKBB9KfwL8NcCvwStaBET fXzD+ABjqm+Oildovw6OkdpSOi7m9TQZQQ== X-Google-Smtp-Source: ABdhPJzjgihkqa6PvHlMUcYfxsWLQbAqqZmnnceeTOMpErPIBKZkavL6ob0UsKxOhvtT20OUhC3Rsw== X-Received: by 2002:a17:90a:a898:: with SMTP id h24mr2843421pjq.179.1603817481803; Tue, 27 Oct 2020 09:51:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 3/3] accel/tcg: Add CPU_LOG_EXEC tracing for cpu_io_recompile() Date: Tue, 27 Oct 2020 09:51:14 -0700 Message-Id: <20201027165114.71508-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201027165114.71508-1-richard.henderson@linaro.org> References: <20201027165114.71508-1-richard.henderson@linaro.org> 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=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Peter Maydell 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 Message-Id: <20201013122658.4620-1-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- 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 d76097296d..4572b4901f 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.25.1