RFC tcg: add tcg_gen_print helper
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tcg: add tcg_gen_print helperaccel/ accel/ include/ +2 more | +324 | 0 replies | |
| 2/3 | scripts: warn on tcg_gen_print usage to the checkpatch.plscripts/ | +5 | 0 replies | |
| 3/3 | docs: add documentation for the tcg_gen_print helper to tcg-opsdocs/ | +33 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH v1 0/3] tcg: add tcg_gen_print helper
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