Re: [PATCH] thermal: trace: migrating thermal traces to use TRACE_DEFINE_ENUM() macros

From: Michele DiGiorgio
Date: Thu Mar 03 2016 - 12:11:06 EST


Hello Steven,

Thanks for acknowledging the patch.

Will you be merging it or should I refer to somebody else?

Kind regards,
Michele

On 01/03/16 18:20, Steven Rostedt wrote:
On Tue, 1 Mar 2016 17:38:54 +0000
Michele Di Giorgio <michele.digiorgio@xxxxxxx> wrote:

> Userspace tools are not aware of how to convert the enums provided by
> the tracepoints to their corresponding strings.
>
> Adding TRACE_DEFINE_ENUM() macros allows to make the enums available
> to userspace to let the tools know what those enum values represent.
>
> In particular, for thermal zone trip types what we obtained before was
> something like:
>
> kworker/1:1-460 [001] 320.372732: thermal_zone_trip: thermal_zone=soc
> id=0 trip=1 trip_type=1
>
> Unfortunately, userspace tools do not know how to convert enum values to
> strings and as a consequence they can only forward the enum value to the
> output. By using TRACE_DEFINE_ENUM() macros for thermal traces we get the
> following trace line:
>
> kworker/1:1-460 [001] 320.372732: thermal_zone_trip: thermal_zone=soc
> id=0 trip=1 trip_type=PASSIVE
>
> Userspace tools are now able to better understand the meaning of the trip_type
> and provide the user with more readable information.
>

Acked-by: Steven Rostedt <rostedt@xxxxxxxxxxx>

-- Steve


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.