diff options
| author | Arnaldo Carvalho de Melo <[email protected]> | 2016-08-05 18:40:30 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2016-08-23 18:37:33 +0000 |
| commit | bd48c63eb0afc28b29fb342f215cdd77b995c02e (patch) | |
| tree | dbbd787a2854cd2a973590a618a19a327bb31a94 /tools/perf/builtin-script.c | |
| parent | Merge branch 'perf/urgent' into perf/core, to pick up fixes before merging ne... (diff) | |
| download | kernel-bd48c63eb0afc28b29fb342f215cdd77b995c02e.tar.gz kernel-bd48c63eb0afc28b29fb342f215cdd77b995c02e.zip | |
tools: Introduce tools/include/linux/time64.h for *SEC_PER_*SEC macros
And remove it from tools/perf/{perf,util}.h, making code that needs
these macros to include linux/time64.h instead, to match how this is
used in the kernel sources.
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index c859e59dfe3e..6b3c8b0d3276 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -24,6 +24,7 @@ #include "util/thread-stack.h" #include <linux/bitmap.h> #include <linux/stringify.h> +#include <linux/time64.h> #include "asm/bug.h" #include "util/mem-events.h" @@ -464,9 +465,9 @@ static void print_sample_start(struct perf_sample *sample, if (PRINT_FIELD(TIME)) { nsecs = sample->time; - secs = nsecs / NSECS_PER_SEC; - nsecs -= secs * NSECS_PER_SEC; - usecs = nsecs / NSECS_PER_USEC; + secs = nsecs / NSEC_PER_SEC; + nsecs -= secs * NSEC_PER_SEC; + usecs = nsecs / NSEC_PER_USEC; if (nanosecs) printf("%5lu.%09llu: ", secs, nsecs); else |
