From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752001AbcHFULM (ORCPT ); Sat, 6 Aug 2016 16:11:12 -0400 Received: from mail.kernel.org ([198.145.29.136]:47898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbcHFULK (ORCPT ); Sat, 6 Aug 2016 16:11:10 -0400 Date: Fri, 5 Aug 2016 20:02:04 -0300 From: Arnaldo Carvalho de Melo To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton Subject: Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number Message-ID: <20160805230204.GB3789@kernel.org> References: <20160209204013.951400594@goodmis.org> <20160209204237.006667394@goodmis.org> <20160302122004.GI3604@kernel.org> <20160805141942.07469948@gandalf.local.home> <20160805183655.GA3789@kernel.org> <20160805151528.216cf1c5@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160805151528.216cf1c5@gandalf.local.home> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Aug 05, 2016 at 03:15:28PM -0400, Steven Rostedt escreveu: > On Fri, 5 Aug 2016 15:36:55 -0300 > Arnaldo Carvalho de Melo wrote: > > > > [acme@jouet linux]$ cat tools/include/linux/time64.h > > #ifndef _TOOLS_LINUX_TIME64_H > > #define _TOOLS_LINUX_TIME64_H > > > > #define MSEC_PER_SEC 1000L > > #define USEC_PER_MSEC 1000L > > #define NSEC_PER_USEC 1000L > > #define NSEC_PER_MSEC 1000000L > > #define USEC_PER_SEC 1000000L > > #define NSEC_PER_SEC 1000000000L > > #define FSEC_PER_SEC 1000000000000000LL > > > > #endif /* _TOOLS_LINUX_TIME64_H */ > > [acme@jouet linux]$ > > > > So the header to include is the same as in the kernel, the constants as > > well. We can go on adding more stuff from include/linux/time64.h as > > tools use it. > > OK, can you modify the scripting-engines/trace-event-*.c to use that > too. I'm going to move the macros locally into event-parse.c, as I work > to make that ready to be a separate library. Ok, and I fix a few more, pushing to perf/core. > Thanks! > > -- Steve