From nobody Mon Feb 9 19:30:03 2026 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=1766171431; cv=none; d=zohomail.com; s=zohoarc; b=ar+82vRb/jBMNpjWpawOuu/uW4Lpqj3Bo1H6KIGUGQQZqzbNbq8tqH6S6mwllIn0LLtVQUsCZwSleAyIm2MvUoLvnhZDLw+TCQcF9JpKXYbeP4dO16lKdjn3gNHku87uUkfL2cgAufNLqnySD6jDuQC5dlAiPYjh49Tx5LPcGrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1766171431; 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=LdWAJH6s7XticPUwO+/xRlCKqNuhKhU8yKqVINAJxXA=; b=cxV2K3N46X7h3o7LncqbAEPQW+X6BXj2pWVLedQPHpNNQAhhBYGSH/29P/Ek2AlIqJ1iVJHxaHB6fMAwAUAnP7iDMSvC/sm+SLaBzBdQOmXNw678Z4cn6AXYRvXpuvs5PzxVxbLQIHyIiY0pobLLdVBnv0LwfNP3846fIZXiC0A= 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 17661714315701013.8605176769161; Fri, 19 Dec 2025 11:10:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vWfrJ-00018p-5t; Fri, 19 Dec 2025 14:09:49 -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 1vWfqZ-0000f0-Sc for qemu-devel@nongnu.org; Fri, 19 Dec 2025 14:09:10 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vWfqX-0006qy-DD for qemu-devel@nongnu.org; Fri, 19 Dec 2025 14:09:03 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4779cb0a33fso21685235e9.0 for ; Fri, 19 Dec 2025 11:08:59 -0800 (PST) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea1aee5sm6533011f8f.4.2025.12.19.11.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 11:08:53 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 72AE06003B; Fri, 19 Dec 2025 19:08:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766171339; x=1766776139; 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=LdWAJH6s7XticPUwO+/xRlCKqNuhKhU8yKqVINAJxXA=; b=seU9cUL3KdiqhUJbXeZkV5ubltZE7lgJYvzMHvzTg5+GA4rgAN/Avc3/C8h0Z43dxl 9LhfKlBtDFNxCS7KgNXUvI9VqRwxPzgmJmuhrGo9MpMCk1vq5T+91b2/Bv8zJrTqiLBz YOML5zgPHIGPo9uAVOBGqVdVWXOOSHRggq3HQGBvz6iuR+TX5M2LHZlGKcrLDCMKnFzn W9R1Hy7sk4mPrLaEdJ7RTgkePvY1vK6bvXS3PLZMrZq9u+P/gyUcmlMnqYhTspu14HGr gC/tlsrbLvJSTt3puu9wCt8MjkqpCofOm/BiqStqWz/Ij17m+sKM4mUixd0MuNTZ0MdM 8dWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766171339; x=1766776139; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LdWAJH6s7XticPUwO+/xRlCKqNuhKhU8yKqVINAJxXA=; b=BLNCU8UDC9iivatpsgmM7H32CV7hKA8KA8G9V76fv2iJYSeMH1IYy+MdD4De/sBohX 9xugiRQMBCQK7/KsDgKJqxTEj12w9zN7nqOKI4XlWYUpyRmVbYsKmKMb4RT/BCMlaRWB apkI+zToSzva+vemIpqO1EtP5w2A38/g9nY7j/SWfhgb9+TB/A6KtJl6pdAHG7dzFnoI CcmIJLZUlY5qjQcKwPJoJez44PWLDsxLm+KeHyI2D6WaV+OKOfaRN7QgJ3uUZkbmm/9q qVjhaCwK12YN109Krx2ngjd3ooG38BECD4s8jpS7rS6IeuRESn2DWMJNfQlfll7CTqlm 2h4w== X-Gm-Message-State: AOJu0Yz5bHrnWcCgiPImXPnhKZG6eX0oFrwBVf36I0Kvq74GCf9q3fvZ p3IU84xoDX1fSG4TEb/GWiGoyGkQhpAnlsAUlH3a/O9BHKf1NkeyFNUkt0peHAcs8pw= X-Gm-Gg: AY/fxX6K3og6VONXumXkP38oaXhe6HuzEQlP9p8jF92fiTrJ+to4qVDC52W1yuGGOQj XPVmO9fzWtq2r0QJItK2kcrra9ROnTaefNYU4Ie0K5CN5aKjEmUUCMebfQRt6WgyTJd2L5RPjCH WcTF9uVGgYsAQ+OH+Rg+WYjv1OveqO5vjD71SwidERtnygq90Mzsku34e1yRC3Udr5UyLv5Y16L pLhu8EIgjyuhu84slXBMOskOPpu8LDP4KmlyTO/rhYWiLumsqgzIk2JVDebdeqKRDO4gvcQ9lGE o1J9D7Vf6re1I9+HyPUiBxObsmChyigwoVCIRnPxp+Yk8FSQ9o++lkL0n7Edm40zEKhLTILwtnT 8Lem4vJM/rWT3s14DqBjalXCmz/q4d0ahWA9TvOe6cs/pjmZn0GfLO9lT8h0DBne0LE5CGF52FK smZCVWSsNbkVc= X-Google-Smtp-Source: AGHT+IH7AC9vVnND0gYXr5atVBGRs/VhsrnYyCclK/S3/odWqahABKmANWELHXqVL5a40P6VSkjfMQ== X-Received: by 2002:a05:6000:250d:b0:42f:bc61:d1d9 with SMTP id ffacd0b85a97d-4324e4c9dc4mr4863073f8f.20.1766171338219; Fri, 19 Dec 2025 11:08:58 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Paolo Bonzini , Alwalid Salama , qemu-arm@nongnu.org, Zhao Liu , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Riku Voipio , Marcel Apfelbaum , Peter Maydell , Mahmoud Mandour , Eduardo Habkost , Mark Burton , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [RFC PATCH 06/12] plugins: shorten aggressively long name Date: Fri, 19 Dec 2025 19:08:43 +0000 Message-ID: <20251219190849.238323-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251219190849.238323-1-alex.bennee@linaro.org> References: <20251219190849.238323-1-alex.bennee@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 (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::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1766171434014158500 The old name comes in at a 51 characters, contains at least one redundant token and exec is arguably implied by inline as all inline operations occur when instructions are executing. By putting the name on a substantial diet we can reduce it by 15% and gain valuable white-space in the process. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pierrick Bouvier --- include/qemu/qemu-plugin.h | 4 ++-- contrib/plugins/cflow.c | 22 +++++++++++----------- contrib/plugins/howvec.c | 2 +- contrib/plugins/stoptrigger.c | 10 ++++++---- plugins/api.c | 2 +- tests/tcg/plugins/discons.c | 18 +++++++++--------- tests/tcg/plugins/inline.c | 6 +++--- tests/tcg/plugins/insn.c | 5 +++-- 8 files changed, 36 insertions(+), 33 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 60de4fdd3fa..29663591ebf 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -516,7 +516,7 @@ void qemu_plugin_register_vcpu_insn_exec_cond_cb( void *userdata); =20 /** - * qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu() - insn exec inlin= e op + * qemu_plugin_register_inline_per_vcpu() - insn exec inline op * @insn: the opaque qemu_plugin_insn handle for an instruction * @op: the type of qemu_plugin_op (e.g. ADD_U64) * @entry: entry to run op @@ -525,7 +525,7 @@ void qemu_plugin_register_vcpu_insn_exec_cond_cb( * Insert an inline op to every time an instruction executes. */ QEMU_PLUGIN_API -void qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( +void qemu_plugin_register_inline_per_vcpu( struct qemu_plugin_insn *insn, enum qemu_plugin_op op, qemu_plugin_u64 entry, diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index b5e33f25f9b..cef5ae2239f 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -320,14 +320,14 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) * check where we are at. Do this on the first instruction and not * the TB so we don't get mixed up with above. */ - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu(first_insn, - QEMU_PLUGIN_INLINE_S= TORE_U64, - end_block, qemu_plug= in_insn_vaddr(last_insn)); - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu(first_insn, - QEMU_PLUGIN_INLINE_S= TORE_U64, - pc_after_block, - qemu_plugin_insn_vad= dr(last_insn) + - qemu_plugin_insn_siz= e(last_insn)); + qemu_plugin_register_inline_per_vcpu(first_insn, + QEMU_PLUGIN_INLINE_STORE_U64, + end_block, qemu_plugin_insn_vaddr= (last_insn)); + qemu_plugin_register_inline_per_vcpu(first_insn, + QEMU_PLUGIN_INLINE_STORE_U64, + pc_after_block, + qemu_plugin_insn_vaddr(last_insn)= + + qemu_plugin_insn_size(last_insn)); =20 for (int idx =3D 0; idx < qemu_plugin_tb_n_insns(tb); ++idx) { struct qemu_plugin_insn *insn =3D qemu_plugin_tb_get_insn(tb, idx); @@ -355,9 +355,9 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) } =20 /* Store the PC of what we are about to execute */ - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu(insn, - QEMU_PLUGIN_IN= LINE_STORE_U64, - last_pc, ipc); + qemu_plugin_register_inline_per_vcpu(insn, + QEMU_PLUGIN_INLINE_STORE_U64, + last_pc, ipc); } } =20 diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 42bddb6566d..c60737d57f1 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -321,7 +321,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) =20 if (cnt) { if (do_inline) { - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + qemu_plugin_register_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, qemu_plugin_scoreboard_u64(cnt), 1); } else { diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index b3a6ed66a7b..68c0ed432af 100644 --- a/contrib/plugins/stoptrigger.c +++ b/contrib/plugins/stoptrigger.c @@ -73,10 +73,12 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) =20 if (exit_on_icount) { /* Increment and check scoreboard for each instruction */ - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( - insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( - insn, QEMU_PLUGIN_INLINE_STORE_U64, current_pc, insn_vaddr= ); + qemu_plugin_register_inline_per_vcpu(insn, + QEMU_PLUGIN_INLINE_ADD_U6= 4, + insn_count, 1); + qemu_plugin_register_inline_per_vcpu(insn, + QEMU_PLUGIN_INLINE_STORE_= U64, + current_pc, insn_vaddr); qemu_plugin_register_vcpu_insn_exec_cond_cb( insn, exit_icount_reached, QEMU_PLUGIN_CB_NO_REGS, QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, NULL); diff --git a/plugins/api.c b/plugins/api.c index eac04cc1f6b..267fa2fd503 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -154,7 +154,7 @@ void qemu_plugin_register_vcpu_insn_exec_cond_cb( cond, entry, imm, udata); } =20 -void qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( +void qemu_plugin_register_inline_per_vcpu( struct qemu_plugin_insn *insn, enum qemu_plugin_op op, qemu_plugin_u64 entry, diff --git a/tests/tcg/plugins/discons.c b/tests/tcg/plugins/discons.c index 2e0e664e823..1348d6e5020 100644 --- a/tests/tcg/plugins/discons.c +++ b/tests/tcg/plugins/discons.c @@ -156,15 +156,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) uint64_t next_pc =3D pc + qemu_plugin_insn_size(insn); uint64_t has_next =3D (i + 1) < n_insns; =20 - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu(insn, - QEMU_PLUGIN_IN= LINE_STORE_U64, - last_pc, pc); - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu(insn, - QEMU_PLUGIN_IN= LINE_STORE_U64, - from_pc, next_= pc); - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu(insn, - QEMU_PLUGIN_IN= LINE_STORE_U64, - has_from, has_= next); + qemu_plugin_register_inline_per_vcpu(insn, + QEMU_PLUGIN_INLINE_STORE_U64, + last_pc, pc); + qemu_plugin_register_inline_per_vcpu(insn, + QEMU_PLUGIN_INLINE_STORE_U64, + from_pc, next_pc); + qemu_plugin_register_inline_per_vcpu(insn, + QEMU_PLUGIN_INLINE_STORE_U64, + has_from, has_next); qemu_plugin_register_vcpu_insn_exec_cb(insn, insn_exec, QEMU_PLUGIN_CB_NO_REGS, NUL= L); } diff --git a/tests/tcg/plugins/inline.c b/tests/tcg/plugins/inline.c index 73dde995781..35307501105 100644 --- a/tests/tcg/plugins/inline.c +++ b/tests/tcg/plugins/inline.c @@ -244,15 +244,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) void *insn_store =3D insn; void *mem_store =3D (char *)insn_store + 0xff; =20 - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + qemu_plugin_register_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_STORE_U64, data_insn, (uintptr_t) insn_store); qemu_plugin_register_vcpu_insn_exec_cb( insn, vcpu_insn_exec, QEMU_PLUGIN_CB_NO_REGS, insn_store); - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + qemu_plugin_register_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, count_insn_inline, 1); =20 - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + qemu_plugin_register_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_cond_track_count, 1); qemu_plugin_register_vcpu_insn_exec_cond_cb( insn, vcpu_insn_cond_exec, QEMU_PLUGIN_CB_NO_REGS, diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index 0c723cb9ed8..b337fda9f13 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -147,8 +147,9 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) struct qemu_plugin_insn *insn =3D qemu_plugin_tb_get_insn(tb, i); =20 if (do_inline) { - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( - insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); + qemu_plugin_register_inline_per_vcpu(insn, + QEMU_PLUGIN_INLINE_ADD_U6= 4, + insn_count, 1); } else { qemu_plugin_register_vcpu_insn_exec_cb( insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, NULL); --=20 2.47.3