[PATCH v2 0/3] tracetool: cleanup "if(true)" check from trace_foo()

Tanish Desai posted 3 patches 4 months, 3 weeks ago
Failed in applying to current master (apply log)
scripts/tracetool/__init__.py         |  6 +++---
scripts/tracetool/backend/__init__.py |  3 +++
scripts/tracetool/backend/dtrace.py   |  3 ++-
scripts/tracetool/backend/ftrace.py   |  3 ---
scripts/tracetool/backend/log.py      |  9 +--------
scripts/tracetool/backend/simple.py   | 11 +----------
scripts/tracetool/backend/syslog.py   | 11 +----------
scripts/tracetool/backend/ust.py      |  2 +-
scripts/tracetool/format/h.py         | 13 +++++++++----
9 files changed, 21 insertions(+), 40 deletions(-)
[PATCH v2 0/3] tracetool: cleanup "if(true)" check from trace_foo()
Posted by Tanish Desai 4 months, 3 weeks ago
This series of patch aims to removes the leftover if (true) condition
from trace_foo, a remnant from the TCG tracing feature removal.

It replaces it with a proper trace_event_get_state(...)
check where necessary (for log/simple/syslog and ftrace backend).

Additionally, this change centralizes the generation of
trace_event_get_state(...) calls into format/h.py,
eliminating redundant code across individual backends.

This cleanup results in more consistent and less
repetitive backend code.

Tanish Desai (3):
  tracetool: removed the unused vcpu property
  tracetool: introduce generate_unconditional
  tracetool: remove redundant event_get_state checks

 scripts/tracetool/__init__.py         |  6 +++---
 scripts/tracetool/backend/__init__.py |  3 +++
 scripts/tracetool/backend/dtrace.py   |  3 ++-
 scripts/tracetool/backend/ftrace.py   |  3 ---
 scripts/tracetool/backend/log.py      |  9 +--------
 scripts/tracetool/backend/simple.py   | 11 +----------
 scripts/tracetool/backend/syslog.py   | 11 +----------
 scripts/tracetool/backend/ust.py      |  2 +-
 scripts/tracetool/format/h.py         | 13 +++++++++----
 9 files changed, 21 insertions(+), 40 deletions(-)

-- 
2.34.1
Re: [PATCH v2 0/3] tracetool: cleanup "if(true)" check from trace_foo()
Posted by Tanish Desai 4 months, 3 weeks ago
Sorry forgot to CC Alex and Paolo .


On Fri, 20 Jun 2025 at 8:07 PM, Tanish Desai <tanishdesai37@gmail.com>
wrote:

> This series of patch aims to removes the leftover if (true) condition
> from trace_foo, a remnant from the TCG tracing feature removal.
>
> It replaces it with a proper trace_event_get_state(...)
> check where necessary (for log/simple/syslog and ftrace backend).
>
> Additionally, this change centralizes the generation of
> trace_event_get_state(...) calls into format/h.py,
> eliminating redundant code across individual backends.
>
> This cleanup results in more consistent and less
> repetitive backend code.
>
> Tanish Desai (3):
>   tracetool: removed the unused vcpu property
>   tracetool: introduce generate_unconditional
>   tracetool: remove redundant event_get_state checks
>
>  scripts/tracetool/__init__.py         |  6 +++---
>  scripts/tracetool/backend/__init__.py |  3 +++
>  scripts/tracetool/backend/dtrace.py   |  3 ++-
>  scripts/tracetool/backend/ftrace.py   |  3 ---
>  scripts/tracetool/backend/log.py      |  9 +--------
>  scripts/tracetool/backend/simple.py   | 11 +----------
>  scripts/tracetool/backend/syslog.py   | 11 +----------
>  scripts/tracetool/backend/ust.py      |  2 +-
>  scripts/tracetool/format/h.py         | 13 +++++++++----
>  9 files changed, 21 insertions(+), 40 deletions(-)
>
> --
> 2.34.1
>
>