mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Peiyong Lin <lpy@google.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Amit Kucheria <amit.kucheria@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>, Pavel Machek <pavel@ucw.cz>,
	linux-kernel@vger.kernel.org, prahladk@google.com,
	android-kernel@google.com
Subject: Re: [PATCH] Add power/gpu_frequency tracepoint.
Date: Thu, 13 Aug 2020 17:22:39 -0400	[thread overview]
Message-ID: <20200813172239.18ccc4f4@oasis.local.home> (raw)
In-Reply-To: <20200813210357.146936-1-lpy@google.com>

On Thu, 13 Aug 2020 14:03:57 -0700
Peiyong Lin <lpy@google.com> wrote:

> +/**
> + * gpu_frequency - Reports frequency changes in GPU clock domains
> + * @state:  New frequency (in KHz)
> + * @gpu_id: GPU clock domain
> + */
> +TRACE_EVENT(gpu_frequency,
> +
> +	TP_PROTO(unsigned int state, unsigned int gpu_id),
> +
> +	TP_ARGS(state, gpu_id),
> +
> +	TP_STRUCT__entry(
> +		__field(unsigned int, state)
> +		__field(unsigned int, gpu_id)

Both of the above entries are unsigned int.

> +	),
> +
> +	TP_fast_assign(
> +		__entry->state = state;
> +		__entry->gpu_id = gpu_id;
> +	),
> +
> +	TP_printk("state=%lu gpu_id=%lu",
> +		(unsigned long)__entry->state,
> +		(unsigned long)__entry->gpu_id)

Why typecast to (unsigned long) to use it in %lu? Why not just have:

	TP_printk("state=%u gpu_id=%u",
		__entry->state, __entry->gpu_id)

?

-- Steve


> +);
>  #endif /* _TRACE_POWER_H */
>  
>  /* This part must be outside protection */


  reply	other threads:[~2020-08-13 21:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 21:03 Peiyong Lin
2020-08-13 21:22 ` Steven Rostedt [this message]
2020-08-13 21:37   ` [PATCH v2] " Peiyong Lin
2020-08-13 21:50     ` Steven Rostedt
2020-08-20 19:41       ` [PATCH v3] " Peiyong Lin
2020-08-20 20:27         ` Steven Rostedt
2020-10-22 16:59           ` [PATCH] " Peiyong Lin
2020-10-22 17:34           ` [PATCH v4] " Peiyong Lin
2020-10-26 22:25             ` Peiyong Lin
2020-10-27  6:16               ` Greg Kroah-Hartman
2020-11-16 20:55             ` Peiyong Lin
2020-11-16 21:05               ` Steven Rostedt
2020-11-17 18:00                 ` Rafael J. Wysocki
2020-11-17 18:10                   ` Alex Deucher
2020-11-17 21:31             ` Peiyong Lin
2020-11-30 22:33               ` Peiyong Lin
2020-12-02 12:34                 ` Brian Starkey
2020-12-21 20:10                   ` [PATCH v5] " Peiyong Lin
2021-03-10 21:56                     ` Peiyong Lin
2021-03-12 18:08                       ` Pavel Machek
     [not found] ` <159741850487.10342.14268227307882225260@build.alporthouse.com>
2020-08-14 19:25   ` [PATCH] " Peiyong Lin

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=20200813172239.18ccc4f4@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=amit.kucheria@linaro.org \
    --cc=android-kernel@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpy@google.com \
    --cc=mingo@redhat.com \
    --cc=paul.walmsley@sifive.com \
    --cc=pavel@ucw.cz \
    --cc=prahladk@google.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yamada.masahiro@socionext.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®