diff options
| author | Adrian Hunter <adrian.hunter@intel.com> | 2014-07-22 09:17:32 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-07-23 10:48:11 -0400 |
| commit | a6a69db4b686e51045771945669bba6578af67c1 (patch) | |
| tree | db97f51a927367b4bd875c7879150af5eba0714a /tools/perf/tests | |
| parent | b9d266baac0429f70df3f9cf751b045730d612e3 (diff) | |
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/tests')
| -rw-r--r-- | tools/perf/tests/perf-time-to-tsc.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/tools/perf/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c index 0372f6edca20..f238442b238a 100644 --- a/tools/perf/tests/perf-time-to-tsc.c +++ b/tools/perf/tests/perf-time-to-tsc.c | |||
| @@ -25,15 +25,6 @@ | |||
| 25 | } \ | 25 | } \ |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | static u64 rdtsc(void) | ||
| 29 | { | ||
| 30 | unsigned int low, high; | ||
| 31 | |||
| 32 | asm volatile("rdtsc" : "=a" (low), "=d" (high)); | ||
| 33 | |||
| 34 | return low | ((u64)high) << 32; | ||
| 35 | } | ||
| 36 | |||
| 37 | /** | 28 | /** |
| 38 | * test__perf_time_to_tsc - test converting perf time to TSC. | 29 | * test__perf_time_to_tsc - test converting perf time to TSC. |
| 39 | * | 30 | * |
