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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user