From nobody Sat Sep 6 16:59:10 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=1756894223; cv=none; d=zohomail.com; s=zohoarc; b=ExjwEF/uzcOnRpNvuseV2nPhbJqcBeIbkoPrlLytNXrsKuV2K+Gutp9sjRXj55TCvkxvYuFEDh4NIIX2Wc25Jv8kwpjGMLoZi+xnNUMuI12xgiKyOg6JIANq8bxFiaHgE6IDFdLb1LtDIz/Imb09wWmG1hQOfiuHpJj0wkuM7b8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894223; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gEfPabvomn383Kvb9BVWwQgaJJGjCsfNW+1Gzb6ZBJ8=; b=gpYmeSgn1wetr6A+JIuQCaWSXmDx89ajwwOabXqInSb0OgJIAPrxj9pcvwgwIpCVIjmZ9VnrqGDrhzPngDLlzHTKQnWTLzT2Lnq3UhirUeg2JOl5Nx7DQaIKShnHSNISesjRDf/FXx8HihV1rHrWcg+KF47a5hgEB47SDT7/v9s= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894223639728.171011660442; Wed, 3 Sep 2025 03:10:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkRB-0005XF-D1; Wed, 03 Sep 2025 06:09:57 -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 1utkR7-0005Ii-Kx for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:53 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkR4-0008UH-Vf for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:53 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3cf991e8c82so3585144f8f.3 for ; Wed, 03 Sep 2025 03:09:50 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3cf276d5e5fsm23234058f8f.27.2025.09.03.03.09.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894188; x=1757498988; 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=gEfPabvomn383Kvb9BVWwQgaJJGjCsfNW+1Gzb6ZBJ8=; b=Hd1ctOC6zKbMPpmxd4eN/1IxotdTudqg1Ml84TVzbfl3e/AZJkEvNhrPnv/WHaYHjj hYjPawjSQljSlb+7UV6+F55s2SfP0oZ3ZHwGT7APy3lzYTFu7GyJz31bdfcfOmGvPWep AOqGVyVubzkmQn3xx0rvaO4bMDIrQn8XHmqH3zCqVpRkCBSONKZGiOZ0V/ejwNS8t+fF PKiAxkF1W/hUfheSDJolRffPB0QGQ5Ch/IRqSB0Gj8ws4CKCN4MfmDMiYQ9Grprcybda gF27MhO+Vq3BW0qVQ8goTSFk0waEgWnxLPEYZdXNaRUKX+TTVVUfOmj9C9Aex9CC4BRg IdGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894188; x=1757498988; 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=gEfPabvomn383Kvb9BVWwQgaJJGjCsfNW+1Gzb6ZBJ8=; b=ealJYqFZ2TrNw+Tdk78CT/bc404koSY3oAWsCuNaMQId3pEUn4xd23bKEr2yca9qUj iPfXdzJ9ZKGQFXxhtEGbtzTNZJ4f/70oLC4QbY2nbgNVEz7dvTHu3vQ9/0B4xLYmoxXs pW5v9h/ID+UzT0xLLyRlighb4hscnOWaqj92VwdVNFkZUJE5zGk2u5VBZ9V4BOYap/Au A5tq3O0NyeDBtZr8I580i/I2Wsl/bc93+PewSDP8CS7jpIfiJd+z8qWxZRIZNrdEYSHu ytxJiydQNSepjXjMOG8priX0kmG2Jw16eyDGez3Hco/36BTPNpg8/Hno2gJZN/GWROfL /OmQ== X-Gm-Message-State: AOJu0Yzn5zEj4AYSdzzXhgZhPr9cEn/WpwqHoAbcpHh7CSCTVhgfZ9dC 5FAeb1BaVU7erSVsQ9fQFpiz7MUKeYvmf5plE/uxXN/KeuD+Ske4hbm/dHpgCCaNJhw2CS/ShjX 8OjEvzd1DCw== X-Gm-Gg: ASbGncuVss7/k86Hqhpy0aF/GCE2Ju1r9jfkJ6kWZC2srlEJiiGtGI28WW1PlprVtsj sCmawALqsZPzwSYBHy97YrNBY/4G9O4Cw0fXL3RWV2YrPijZP/B5LZk4N1e5tYYylxWLphjGbF9 IP7GftN6+d2yuUO9SdrzRn070zZqFPx7QFMaDsJn4n2IhfQF7K/b1bKK8RwG/7l7V0/AUSMQlpf JvVJkIuPWv+Co3NHrSah784ThebJzVD74kKGbdGOBK0VVDdtohuDPByojqZbXpGDpJy5rOpZ3kk z9Ag4bseRND6btuhkM4KCkeAeDCYNN5tecR6tzOaUp+E9teiOhQ9E6Yy4usUvU1USbMZ+0rNAme +KjJwO0OnOPRYg4yc5b0UIs6OvZDKdbvbI57HW5j8H09Ys8/kUSQXsvqNz5mMhNgSWBAugJBN2w l2UwwFaNj9C+4cNm1S X-Google-Smtp-Source: AGHT+IHjeaXBZbON+AmbQcwUe0SBB9pAgd5tx8CaxlcG5omgkudltDqO1g1YjTt5ypja3T0r9Tow3A== X-Received: by 2002:a05:6000:2f84:b0:3cb:cc6f:734e with SMTP id ffacd0b85a97d-3d1dcb74345mr11728532f8f.14.1756894188421; Wed, 03 Sep 2025 03:09:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 19/24] cpus: Trace cpu_exec_start() and cpu_exec_end() calls Date: Wed, 3 Sep 2025 12:06:55 +0200 Message-ID: <20250903100702.16726-20-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1756894224573116600 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- cpu-common.c | 3 +++ trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cpu-common.c b/cpu-common.c index 152661df8e9..614391fb9bc 100644 --- a/cpu-common.c +++ b/cpu-common.c @@ -249,6 +249,8 @@ void end_exclusive(void) /* Wait for exclusive ops to finish, and begin cpu execution. */ void cpu_exec_start(CPUState *cpu) { + trace_cpu_exec_start(cpu->cpu_index); + qatomic_set(&cpu->running, true); =20 /* Write cpu->running before reading pending_cpus. */ @@ -319,6 +321,7 @@ void cpu_exec_end(CPUState *cpu) } } } + trace_cpu_exec_end(cpu->cpu_index); } =20 void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func, diff --git a/trace-events b/trace-events index 3ec8a6c7202..faeba6242fa 100644 --- a/trace-events +++ b/trace-events @@ -29,6 +29,8 @@ breakpoint_insert(int cpu_index, uint64_t pc, int flags) "cpu=3D%d pc=3D0x= %" PRIx64 " flags=3D0x%x" breakpoint_remove(int cpu_index, uint64_t pc, int flags) "cpu=3D%d pc=3D0x= %" PRIx64 " flags=3D0x%x" breakpoint_singlestep(int cpu_index, int enabled) "cpu=3D%d enable=3D%d" +cpu_exec_start(int cpu_index) "cpu=3D%d" +cpu_exec_end(int cpu_index) "cpu=3D%d" =20 # job.c job_state_transition(void *job, int ret, const char *legal, const char *s= 0, const char *s1) "job %p (ret: %d) attempting %s transition (%s-->%s)" --=20 2.51.0