summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/tsc.c
diff options
context:
space:
mode:
authorAdrian Hunter2014-07-22 15:17:32 +0200
committerArnaldo Carvalho de Melo2014-07-23 16:48:11 +0200
commita6a69db4b686e51045771945669bba6578af67c1 (patch)
treedb97f51a927367b4bd875c7879150af5eba0714a /tools/perf/util/tsc.c
parentperf machine: Add ability to record the current tid for each cpu (diff)
downloadkernel-qcow2-linux-a6a69db4b686e51045771945669bba6578af67c1.tar.gz
kernel-qcow2-linux-a6a69db4b686e51045771945669bba6578af67c1.tar.xz
kernel-qcow2-linux-a6a69db4b686e51045771945669bba6578af67c1.zip
perf tools: Move rdtsc() function
Move the rdtsc() function so it can be reusued. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1406035081-14301-24-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/tsc.c')
-rw-r--r--tools/perf/util/tsc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/tsc.c b/tools/perf/util/tsc.c
index ef4749836ce9..4d4210d4e13d 100644
--- a/tools/perf/util/tsc.c
+++ b/tools/perf/util/tsc.c
@@ -23,3 +23,8 @@ u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc)
return tc->time_zero + quot * tc->time_mult +
((rem * tc->time_mult) >> tc->time_shift);
}
+
+u64 __weak rdtsc(void)
+{
+ return 0;
+}