lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200813172239.18ccc4f4@oasis.local.home>
Date:   Thu, 13 Aug 2020 17:22:39 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Peiyong Lin <lpy@...gle.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Amit Kucheria <amit.kucheria@...aro.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Pavel Machek <pavel@....cz>, linux-kernel@...r.kernel.org,
        prahladk@...gle.com, android-kernel@...gle.com
Subject: Re: [PATCH] Add power/gpu_frequency tracepoint.

On Thu, 13 Aug 2020 14:03:57 -0700
Peiyong Lin <lpy@...gle.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 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ