Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457256

Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number
Date 2016-08-05 21:20 +0200
Message-ID <s2SOZ-3fo-11@gated-at.bofh.it> (permalink)
References <r0nou-QC-3@gated-at.bofh.it> <r0nov-QC-23@gated-at.bofh.it> <r8e4F-7wR-3@gated-at.bofh.it> <s2S2C-2EU-27@gated-at.bofh.it> <s2Sci-2Ir-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 5 Aug 2016 15:36:55 -0300
Arnaldo Carvalho de Melo <acme@kernel.org> 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.

Thanks!

-- Steve

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of  hardcoded number Steven Rostedt <rostedt@goodmis.org> - 2016-08-05 20:30 +0200
  Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of  hardcoded number Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-05 20:40 +0200
    Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of  hardcoded number Steven Rostedt <rostedt@goodmis.org> - 2016-08-05 21:20 +0200
      Re: [PATCH 2/4] tools lib traceevent: Use USECS_PER_SEC instead of  hardcoded number Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-06 22:20 +0200

csiph-web