All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Tanish Desai <tanishdesai37@gmail.com>
Cc: qemu-devel@nongnu.org,  Stefan Hajnoczi <stefanha@redhat.com>,
	 Mads Ynddal <mads@ynddal.dk>
Subject: Re: [PATCH v2 1/3] tracetool: removed the unused vcpu property
Date: Fri, 20 Jun 2025 17:12:59 +0100	[thread overview]
Message-ID: <87jz56s86s.fsf@draig.linaro.org> (raw)
In-Reply-To: <20250620143720.3143-2-tanishdesai37@gmail.com> (Tanish Desai's message of "Fri, 20 Jun 2025 14:37:18 +0000")

Tanish Desai <tanishdesai37@gmail.com> writes:

> The vcpu property is no longer used in these backends. Removing it avoids
> unnecessary checks and simplifies the code generation for these trace
> backends.
>
> Signed-off-by: Tanish Desai <tanishdesai37@gmail.com>

I think you forgot to collect the r-b tags from v1, see:

  https://qemu.readthedocs.io/en/master/devel/submitting-a-patch.html#proper-use-of-reviewed-by-tags-can-aid-review

> ---
>  scripts/tracetool/__init__.py       | 6 +++---
>  scripts/tracetool/backend/log.py    | 6 +-----
>  scripts/tracetool/backend/simple.py | 6 +-----
>  scripts/tracetool/backend/syslog.py | 6 +-----
>  4 files changed, 6 insertions(+), 18 deletions(-)
>
> diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
> index bc03238c0f..e86c898a1e 100644
> --- a/scripts/tracetool/__init__.py
> +++ b/scripts/tracetool/__init__.py
> @@ -216,9 +216,9 @@ class Event(object):
>                        r"\s*"
>                        r"(?:(?:(?P<fmt_trans>\".+),)?\s*(?P<fmt>\".+))?"
>                        r"\s*")
> -
> -    _VALID_PROPS = set(["disable", "vcpu"])
> -
> +    
> +    _VALID_PROPS = set(["disable"])
> +    
>      def __init__(self, name, props, fmt, args, lineno, filename, orig=None,
>                   event_trans=None, event_exec=None):
>          """
> diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
> index de27b7e62e..f24acad74c 100644
> --- a/scripts/tracetool/backend/log.py
> +++ b/scripts/tracetool/backend/log.py
> @@ -31,11 +31,7 @@ def generate_h(event, group):
>      if len(event.args) > 0:
>          argnames = ", " + argnames
>  
> -    if "vcpu" in event.properties:
> -        # already checked on the generic format code
> -        cond = "true"
> -    else:
> -        cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
> +    cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
>  
>      out('    if (%(cond)s && qemu_loglevel_mask(LOG_TRACE)) {',
>          '        if (message_with_timestamp) {',
> diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
> index 2688d4b64b..7c84c06b20 100644
> --- a/scripts/tracetool/backend/simple.py
> +++ b/scripts/tracetool/backend/simple.py
> @@ -37,11 +37,7 @@ def generate_h_begin(events, group):
>  
>  def generate_h(event, group):
>      event_id = 'TRACE_' + event.name.upper()
> -    if "vcpu" in event.properties:
> -        # already checked on the generic format code
> -        cond = "true"
> -    else:
> -        cond = "trace_event_get_state(%s)" % event_id
> +    cond = "trace_event_get_state(%s)" % event_id
>      out('    if (%(cond)s) {',
>          '        _simple_%(api)s(%(args)s);',
>          '    }',
> diff --git a/scripts/tracetool/backend/syslog.py b/scripts/tracetool/backend/syslog.py
> index 012970f6cc..6fdc1142fb 100644
> --- a/scripts/tracetool/backend/syslog.py
> +++ b/scripts/tracetool/backend/syslog.py
> @@ -30,11 +30,7 @@ def generate_h(event, group):
>      if len(event.args) > 0:
>          argnames = ", " + argnames
>  
> -    if "vcpu" in event.properties:
> -        # already checked on the generic format code
> -        cond = "true"
> -    else:
> -        cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
> +    cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
>  
>      out('    if (%(cond)s) {',
>          '#line %(event_lineno)d "%(event_filename)s"',

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2025-06-20 16:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20 14:37 [PATCH v2 0/3] tracetool: cleanup "if(true)" check from trace_foo() Tanish Desai
2025-06-20 14:37 ` [PATCH v2 1/3] tracetool: removed the unused vcpu property Tanish Desai
2025-06-20 16:12   ` Alex Bennée [this message]
2025-06-20 16:27     ` Tanish Desai
2025-06-20 14:37 ` [PATCH v2 2/3] tracetool: introduce generate_unconditional Tanish Desai
2025-06-24 14:37   ` Stefan Hajnoczi
2025-06-24 17:37     ` Tanish Desai
2025-06-24 19:03       ` Stefan Hajnoczi
2025-06-25 12:30         ` [PATCH v3] tracetool: generates conitional checks when needed Tanish Desai
2025-06-26 18:43           ` Stefan Hajnoczi
2025-06-26 19:30             ` Tanish Desai
2025-06-20 14:37 ` [PATCH v2 3/3] tracetool: remove redundant event_get_state checks Tanish Desai
2025-06-24 14:26   ` Stefan Hajnoczi
2025-06-20 14:38 ` [PATCH v2 0/3] tracetool: cleanup "if(true)" check from trace_foo() Tanish Desai

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=87jz56s86s.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=mads@ynddal.dk \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=tanishdesai37@gmail.com \
    /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.