From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964812AbcBYURi (ORCPT ); Thu, 25 Feb 2016 15:17:38 -0500 Received: from smtprelay0202.hostedemail.com ([216.40.44.202]:59013 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933600AbcBYURh (ORCPT ); Thu, 25 Feb 2016 15:17:37 -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:981:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1963:2393:2553:2559:2562:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3874:4321:5007:6261:7875:8660:10004:10400:10848:10967:11026:11232:11658:11914:12043:12114:12438:12517:12519:12555:12740:13069:13148:13230:13255:13311:13357:14096:14097:14659:21080:30054:30056:30070: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:2,LUA_SUMMARY:none X-HE-Tag: flock43_422602ab36c25 X-Filterd-Recvd-Size: 2327 Date: Thu, 25 Feb 2016 15:17:33 -0500 From: Steven Rostedt To: Arnaldo Carvalho de Melo Cc: LKML , Ingo Molnar , Namhyung Kim Subject: Re: [PATCH] tools lib traceevent: Split pevent_print_event() into specific functionality functions Message-ID: <20160225151733.285b9223@gandalf.local.home> In-Reply-To: <20160225201413.GS8720@kernel.org> References: <20160225122033.5adf3863@gandalf.local.home> <20160225201413.GS8720@kernel.org> 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 On Thu, 25 Feb 2016 17:14:13 -0300 Arnaldo Carvalho de Melo wrote: > Em Thu, Feb 25, 2016 at 12:20:33PM -0500, Steven Rostedt escreveu: > > Currently there's a single function that is used to display a record's > > data in human readable format. That's pevent_print_event(). > > Unfortunately, this gives little room for adding other output within > > the line without updating that function call. > > > > I've decided to split that function into 3 parts. > > > > pevent_print_event_task() which prints the task comm, pid and the CPU > > pevent_print_event_time() which outputs the record's timestamp > > pevent_print_event_data() which outputs the rest of the event data. > > > > pevent_print_event() now simply calls these three functions. > > > > To save time from doing the search for event from the record's type, I > > created a new helper function called pevent_find_event_by_record(), > > which returns the record's event, and this event has to be passed to > > the above functions. > > > > Signed-off-by: Steven Rostedt > > --- > > diff --git a/event-parse.c b/event-parse.c > > index 18e93e430b8b..559d77381a60 100644 > > --- a/event-parse.c > > +++ b/event-parse.c > > > Isn't this on tools/lib/traceevent? > Oops, I did the change from trace-cmd. I'll repost. Sorry ;-) -- Steve