From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbbCaW4d (ORCPT ); Tue, 31 Mar 2015 18:56:33 -0400 Received: from smtprelay0005.hostedemail.com ([216.40.44.5]:52326 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750797AbbCaW4c (ORCPT ); Tue, 31 Mar 2015 18:56:32 -0400 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:1542:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2895:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4605:5007:6261:7875:7903:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12296:12438:12517:12519:12663:12740:13161:13180:13229:14096:14097:21080,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 X-HE-Tag: cup83_55d4df48e7617 X-Filterd-Recvd-Size: 3530 Date: Tue, 31 Mar 2015 18:56:28 -0400 From: Steven Rostedt To: Dave Chinner Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Namhyung Kim , Masami Hiramatsu , Mathieu Desnoyers Subject: Re: [RFC][PATCH 00/10] tracing: Use TRACE_DEFINE_ENUM() to show enum values Message-ID: <20150331185628.6e0480b2@gandalf.local.home> In-Reply-To: <20150331213005.GA8465@dastard> References: <20150327213704.857765144@goodmis.org> <20150331213005.GA8465@dastard> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; 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 On Wed, 1 Apr 2015 08:30:05 +1100 Dave Chinner wrote: > On Fri, Mar 27, 2015 at 05:37:04PM -0400, Steven Rostedt wrote: > > > > As there are many tracepoints that use __print_symbolic() to translate > > numbers into ASCII strings, and several of these translate enums as > > well, it causes a problem for user space tools that read the tracepoint > > format files and have to translate the binary data to their associated > > strings. > ..... > > Steven Rostedt (Red Hat) (10): > > tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values > > tracing: Allow for modules to export their trace enums as well > > x86/tlb/trace: Export enums in used by tlb_flush tracepoint > > net/9p/tracing: Export enums in tracepoints to userspace > > f2fs: Export the enums in the tracepoints to userspace > > irq/tracing: Export enums in tracepoints to user space > > mm: tracing: Export enums in tracepoints to user space > > SUNRPC: Export enums in tracepoints to user space > > v4l: Export enums used by tracepoints to user space > > writeback: Export enums used by tracepoint to user space > > So are you expecting subsystem maintainers to modify their tracing > code to do this, or is this just the first round of changes you are > making? e.g: > > $ grep print_symbolic fs/xfs/xfs_trace.h > __print_symbolic(__entry->trans_type, XFS_TRANS_TYPES), > __print_symbolic(__entry->type, XFS_LI_TYPE_DESC), > __print_symbolic(__entry->type, XFS_LI_TYPE_DESC), > __print_symbolic(__entry->type, XFS_IO_TYPES), > __print_symbolic(__entry->type, XFS_ALLOC_TYPES), > __print_symbolic(__entry->otype, XFS_ALLOC_TYPES), > __print_symbolic(__entry->which, XFS_SWAPEXT_INODES), > __print_symbolic(__entry->format, XFS_INODE_FORMAT_STR), > __print_symbolic(__entry->type, XFS_LI_TYPE_DESC), Note, it only is needed for enums. Those look to be macros (#define), which does not have a problem (the value is shown to userspace, not the name). > $ > > And a quick git grep indicates there are a lot that you haven't > converted in this patchset... But yes, I only covered the include/trace/events/*.h files. I'm sure there's others I would need to update. But this can be done incrementally. -- Steve