diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-08-05 14:40:30 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-08-23 14:37:33 -0400 |
commit | bd48c63eb0afc28b29fb342f215cdd77b995c02e (patch) | |
tree | dbbd787a2854cd2a973590a618a19a327bb31a94 /tools/perf/builtin-script.c | |
parent | ce90c12d2453aa6be743719bb0a5d4040b92700f (diff) |
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 <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-e69fc1pvkgt57yvxqt6eunyg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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 @@ | |||
24 | #include "util/thread-stack.h" | 24 | #include "util/thread-stack.h" |
25 | #include <linux/bitmap.h> | 25 | #include <linux/bitmap.h> |
26 | #include <linux/stringify.h> | 26 | #include <linux/stringify.h> |
27 | #include <linux/time64.h> | ||
27 | #include "asm/bug.h" | 28 | #include "asm/bug.h" |
28 | #include "util/mem-events.h" | 29 | #include "util/mem-events.h" |
29 | 30 | ||
@@ -464,9 +465,9 @@ static void print_sample_start(struct perf_sample *sample, | |||
464 | 465 | ||
465 | if (PRINT_FIELD(TIME)) { | 466 | if (PRINT_FIELD(TIME)) { |
466 | nsecs = sample->time; | 467 | nsecs = sample->time; |
467 | secs = nsecs / NSECS_PER_SEC; | 468 | secs = nsecs / NSEC_PER_SEC; |
468 | nsecs -= secs * NSECS_PER_SEC; | 469 | nsecs -= secs * NSEC_PER_SEC; |
469 | usecs = nsecs / NSECS_PER_USEC; | 470 | usecs = nsecs / NSEC_PER_USEC; |
470 | if (nanosecs) | 471 | if (nanosecs) |
471 | printf("%5lu.%09llu: ", secs, nsecs); | 472 | printf("%5lu.%09llu: ", secs, nsecs); |
472 | else | 473 | else |