From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161483AbcHEOoX (ORCPT ); Fri, 5 Aug 2016 10:44:23 -0400 Received: from smtprelay0200.hostedemail.com ([216.40.44.200]:42488 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161262AbcHEOoV convert rfc822-to-8bit (ORCPT ); Fri, 5 Aug 2016 10:44:21 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::,RULES_HIT:41:152:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1513:1515:1516:1518:1521:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3872:3874:4321:5007:6261:7875:10004:10400:10848:10967:11026:11232:11658:11914:12296:12517:12519:12555:12740:13069:13161:13229:13311:13357:14181:14659:14721:21080:21451:30012:30054: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:3,LUA_SUMMARY:none X-HE-Tag: maid53_25001ba59bc03 X-Filterd-Recvd-Size: 2200 Date: Fri, 5 Aug 2016 10:44:13 -0400 From: Steven Rostedt To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Ingo Molnar , Andrew Morton , Clark Williams , Thomas Gleixner , Jon Masters , Daniel Wagner , Carsten Emde Subject: Re: [RFC][PATCH 1/3] tracing: Added hardware latency tracer Message-ID: <20160805104413.781611b5@gandalf.local.home> In-Reply-To: <20160805142521.GA21312@linutronix.de> References: <20160804145708.158968389@goodmis.org> <20160804145839.856286626@goodmis.org> <20160805142521.GA21312@linutronix.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 5 Aug 2016 16:25:21 +0200 Sebastian Andrzej Siewior wrote: > * Steven Rostedt | 2016-08-04 10:57:09 [-0400]: > > >diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c > >new file mode 100644 > >index 000000000000..08dfabe4e862 > >--- /dev/null > >+++ b/kernel/trace/trace_hwlat.c > … > >+/* Macros to encapsulate the time capturing infrastructure */ > >+#define time_type u64 > >+#define time_get() trace_clock_local() > >+#define time_to_us(x) div_u64(x, 1000) > >+#define time_sub(a, b) ((a) - (b)) > >+#define init_time(a, b) (a = b) > >+#define time_u64(a) a > > Do we need a macro for this? In the old code we could choose between > CONFIG_TRACING but now we don't. > Probably not, I kept it for two reasons. 1) to keep the same logic as what was in PREEMPT_RT, and 2) in case we can come up with a better clock. But it's not that important. Should it be nuked? They do somewhat make the code easier to read. -- Steve