From: Chao Liu <chao.liu.zevorn@gmail.com>
To: richard.henderson@linaro.org, pbonzini@redhat.com
Cc: qemu-devel@nongnu.org, hust-os-kernel-patches@googlegroups.com,
Chao Liu <chao.liu.zevorn@gmail.com>
Subject: [RFC PATCH v1 0/3] tcg: add tcg_gen_print helper
Date: Sat, 27 Dec 2025 00:51:18 +0800 [thread overview]
Message-ID: <cover.1766767299.git.chao.liu.zevorn@gmail.com> (raw)
Hi,
This series adds a printf-style helper for TCG to simplify debugging TB
translations.
The first patch implements tcg_gen_print plus the runtime support code that
formats the arguments when the helper is invoked.
The second patch updates scripts/checkpatch.pl to warn if a patch still
contains tcg_gen_print() so that developers do not accidentally merge
debug prints.
The final patch documents the helper in docs/devel/tcg-ops.rst.
Usage:
```
tcg_gen_print("const value = 0x%lx\n"
TCG_PRINT_ARG_I64, tcg_constant_i64(0xdead),
TCG_PRINT_ARG_END);
```
P.S. I think this debugging feature will be well-received. :)
Finally, happy new year to all ~
Thank,
Chao
Chao Liu (3):
tcg: add tcg_gen_print helper
scripts: warn on tcg_gen_print usage to the checkpatch.pl
docs: add documentation for the tcg_gen_print helper to tcg-ops
accel/tcg/tcg-runtime.c | 187 ++++++++++++++++++++++++++++++++++++
accel/tcg/tcg-runtime.h | 1 +
docs/devel/tcg-ops.rst | 33 +++++++
include/tcg/tcg-op-common.h | 2 +
include/tcg/tcg-print.h | 45 +++++++++
scripts/checkpatch.pl | 5 +
tcg/tcg-op.c | 89 +++++++++++++++++
7 files changed, 362 insertions(+)
create mode 100644 include/tcg/tcg-print.h
--
2.52.0
next reply other threads:[~2025-12-26 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-26 16:51 Chao Liu [this message]
2025-12-26 16:51 ` [RFC PATCH v1 1/3] tcg: add tcg_gen_print helper Chao Liu
2025-12-26 16:51 ` [RFC PATCH v1 2/3] scripts: warn on tcg_gen_print usage to the checkpatch.pl Chao Liu
2025-12-26 16:51 ` [RFC PATCH v1 3/3] docs: add documentation for the tcg_gen_print helper to tcg-ops Chao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1766767299.git.chao.liu.zevorn@gmail.com \
--to=chao.liu.zevorn@gmail.com \
--cc=hust-os-kernel-patches@googlegroups.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.