Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbcCASUM (ORCPT ); Tue, 1 Mar 2016 13:20:12 -0500 Received: from smtprelay0143.hostedemail.com ([216.40.44.143]:45754 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751421AbcCASUL (ORCPT ); Tue, 1 Mar 2016 13:20:11 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2692:2892:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:5007:6261:7875:10004:10400:10848:10967:11026:11232:11473:11658:11914:12296:12517:12519:12555:12740:13069:13255:13311:13357:13439:14659:21080:21220:30051:30054:30075:30080:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: wing48_3b49cb6c4a334 X-Filterd-Recvd-Size: 2202 Date: Tue, 1 Mar 2016 13:20:06 -0500 From: Steven Rostedt To: Michele Di Giorgio Cc: linux-pm@vger.kernel.org, Ingo Molnar , Javi Merino , linux-kernel@vger.kernel.org, Punit Agrawal , Eduardo Valentin Subject: Re: [PATCH] thermal: trace: migrating thermal traces to use TRACE_DEFINE_ENUM() macros Message-ID: <20160301132006.1cda539c@gandalf.local.home> In-Reply-To: <1456853934-24715-1-git-send-email-michele.digiorgio@arm.com> References: <1456853934-24715-1-git-send-email-michele.digiorgio@arm.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1134 Lines: 30 On Tue, 1 Mar 2016 17:38:54 +0000 Michele Di Giorgio 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 -- Steve