diff options
author | David Sharp <dhsharp@google.com> | 2012-11-13 15:18:21 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-11-13 15:48:27 -0500 |
commit | 8cbd9cc6254065c97c4bac42daa55ba1abe73a8e (patch) | |
tree | bb52f23f66fc6288e7efbce76ee389af0b52cc85 | |
parent | 7bcfaf54f591a0775254c4ea679faf615152ee3a (diff) |
tracing,x86: Add a TSC trace_clock
In order to promote interoperability between userspace tracers and ftrace,
add a trace_clock that reports raw TSC values which will then be recorded
in the ring buffer. Userspace tracers that also record TSCs are then on
exactly the same time base as the kernel and events can be unambiguously
interlaced.
Tested: Enabled a tracepoint and the "tsc" trace_clock and saw very large
timestamp values.
v2:
Move arch-specific bits out of generic code.
v3:
Rename "x86-tsc", cleanups
v7:
Generic arch bits in Kbuild.
Google-Bug-Id: 6980623
Link: http://lkml.kernel.org/r/1352837903-32191-1-git-send-email-dhsharp@google.com
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>
Signed-off-by: David Sharp <dhsharp@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
33 files changed, 88 insertions, 0 deletions
diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index 64ffc9e9e548..dcfabb9f05a0 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild | |||
@@ -11,3 +11,4 @@ header-y += reg.h | |||
11 | header-y += regdef.h | 11 | header-y += regdef.h |
12 | header-y += sysinfo.h | 12 | header-y += sysinfo.h |
13 | generic-y += exec.h | 13 | generic-y += exec.h |
14 | generic-y += trace_clock.h | ||
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index f70ae175a3d6..514e398f1a07 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -31,5 +31,6 @@ generic-y += sockios.h | |||
31 | generic-y += termbits.h | 31 | generic-y += termbits.h |
32 | generic-y += termios.h | 32 | generic-y += termios.h |
33 | generic-y += timex.h | 33 | generic-y += timex.h |
34 | generic-y += trace_clock.h | ||
34 | generic-y += types.h | 35 | generic-y += types.h |
35 | generic-y += unaligned.h | 36 | generic-y += unaligned.h |
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index a581a2205938..6e9ca462127f 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild | |||
@@ -43,6 +43,7 @@ generic-y += swab.h | |||
43 | generic-y += termbits.h | 43 | generic-y += termbits.h |
44 | generic-y += termios.h | 44 | generic-y += termios.h |
45 | generic-y += topology.h | 45 | generic-y += topology.h |
46 | generic-y += trace_clock.h | ||
46 | generic-y += types.h | 47 | generic-y += types.h |
47 | generic-y += unaligned.h | 48 | generic-y += unaligned.h |
48 | generic-y += user.h | 49 | generic-y += user.h |
diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index 4807ded352c5..4dd4f78d3dcc 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += exec.h | 3 | generic-y += exec.h |
4 | generic-y += trace_clock.h | ||
diff --git a/arch/blackfin/include/asm/Kbuild b/arch/blackfin/include/asm/Kbuild index 5a0625aad6a0..27d70759474c 100644 --- a/arch/blackfin/include/asm/Kbuild +++ b/arch/blackfin/include/asm/Kbuild | |||
@@ -38,6 +38,7 @@ generic-y += statfs.h | |||
38 | generic-y += termbits.h | 38 | generic-y += termbits.h |
39 | generic-y += termios.h | 39 | generic-y += termios.h |
40 | generic-y += topology.h | 40 | generic-y += topology.h |
41 | generic-y += trace_clock.h | ||
41 | generic-y += types.h | 42 | generic-y += types.h |
42 | generic-y += ucontext.h | 43 | generic-y += ucontext.h |
43 | generic-y += unaligned.h | 44 | generic-y += unaligned.h |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 112a496d8355..eae7b5963e86 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
@@ -49,6 +49,7 @@ generic-y += termbits.h | |||
49 | generic-y += termios.h | 49 | generic-y += termios.h |
50 | generic-y += tlbflush.h | 50 | generic-y += tlbflush.h |
51 | generic-y += topology.h | 51 | generic-y += topology.h |
52 | generic-y += trace_clock.h | ||
52 | generic-y += types.h | 53 | generic-y += types.h |
53 | generic-y += ucontext.h | 54 | generic-y += ucontext.h |
54 | generic-y += user.h | 55 | generic-y += user.h |
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index 6d43a951b5ec..15a122c3767c 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild | |||
@@ -11,3 +11,4 @@ header-y += sync_serial.h | |||
11 | generic-y += clkdev.h | 11 | generic-y += clkdev.h |
12 | generic-y += exec.h | 12 | generic-y += exec.h |
13 | generic-y += module.h | 13 | generic-y += module.h |
14 | generic-y += trace_clock.h | ||
diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index 4a159da23633..c5d767028306 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += exec.h | 3 | generic-y += exec.h |
4 | generic-y += trace_clock.h | ||
diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index 50bbf387b2f8..4bc8ae73e08a 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild | |||
@@ -3,3 +3,4 @@ include include/asm-generic/Kbuild.asm | |||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += exec.h | 4 | generic-y += exec.h |
5 | generic-y += module.h | 5 | generic-y += module.h |
6 | generic-y += trace_clock.h | ||
diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 3bfa9b30f448..bdb54ceb53bc 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild | |||
@@ -48,6 +48,7 @@ generic-y += stat.h | |||
48 | generic-y += termbits.h | 48 | generic-y += termbits.h |
49 | generic-y += termios.h | 49 | generic-y += termios.h |
50 | generic-y += topology.h | 50 | generic-y += topology.h |
51 | generic-y += trace_clock.h | ||
51 | generic-y += types.h | 52 | generic-y += types.h |
52 | generic-y += ucontext.h | 53 | generic-y += ucontext.h |
53 | generic-y += unaligned.h | 54 | generic-y += unaligned.h |
diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild index dd02f09b6eda..05b03ecd7933 100644 --- a/arch/ia64/include/asm/Kbuild +++ b/arch/ia64/include/asm/Kbuild | |||
@@ -2,3 +2,4 @@ | |||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += exec.h | 3 | generic-y += exec.h |
4 | generic-y += kvm_para.h | 4 | generic-y += kvm_para.h |
5 | generic-y += trace_clock.h | ||
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index 50bbf387b2f8..4bc8ae73e08a 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild | |||
@@ -3,3 +3,4 @@ include include/asm-generic/Kbuild.asm | |||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += exec.h | 4 | generic-y += exec.h |
5 | generic-y += module.h | 5 | generic-y += module.h |
6 | generic-y += trace_clock.h | ||
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index 88fa3ac86fae..7f1949c0e089 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild | |||
@@ -24,6 +24,7 @@ generic-y += sections.h | |||
24 | generic-y += siginfo.h | 24 | generic-y += siginfo.h |
25 | generic-y += statfs.h | 25 | generic-y += statfs.h |
26 | generic-y += topology.h | 26 | generic-y += topology.h |
27 | generic-y += trace_clock.h | ||
27 | generic-y += types.h | 28 | generic-y += types.h |
28 | generic-y += word-at-a-time.h | 29 | generic-y += word-at-a-time.h |
29 | generic-y += xor.h | 30 | generic-y += xor.h |
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index 8653072d7e9f..2957fcc71764 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild | |||
@@ -3,3 +3,4 @@ include include/asm-generic/Kbuild.asm | |||
3 | header-y += elf.h | 3 | header-y += elf.h |
4 | generic-y += clkdev.h | 4 | generic-y += clkdev.h |
5 | generic-y += exec.h | 5 | generic-y += exec.h |
6 | generic-y += trace_clock.h | ||
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild index 533053d12ced..9b54b7a403d4 100644 --- a/arch/mips/include/asm/Kbuild +++ b/arch/mips/include/asm/Kbuild | |||
@@ -1 +1,2 @@ | |||
1 | # MIPS headers | 1 | # MIPS headers |
2 | generic-y += trace_clock.h | ||
diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index 4a159da23633..c5d767028306 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | 1 | ||
2 | generic-y += clkdev.h | 2 | generic-y += clkdev.h |
3 | generic-y += exec.h | 3 | generic-y += exec.h |
4 | generic-y += trace_clock.h | ||
diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index 78de6805268d..8971026e1c63 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild | |||
@@ -60,6 +60,7 @@ generic-y += swab.h | |||
60 | generic-y += termbits.h | 60 | generic-y += termbits.h |
61 | generic-y += termios.h | 61 | generic-y += termios.h |
62 | generic-y += topology.h | 62 | generic-y += topology.h |
63 | generic-y += trace_clock.h | ||
63 | generic-y += types.h | 64 | generic-y += types.h |
64 | generic-y += ucontext.h | 65 | generic-y += ucontext.h |
65 | generic-y += user.h | 66 | generic-y += user.h |
diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index bac8debecffb..ff4c9faed546 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild | |||
@@ -3,3 +3,4 @@ generic-y += word-at-a-time.h auxvec.h user.h cputime.h emergency-restart.h \ | |||
3 | segment.h topology.h vga.h device.h percpu.h hw_irq.h mutex.h \ | 3 | segment.h topology.h vga.h device.h percpu.h hw_irq.h mutex.h \ |
4 | div64.h irq_regs.h kdebug.h kvm_para.h local64.h local.h param.h \ | 4 | div64.h irq_regs.h kdebug.h kvm_para.h local64.h local.h param.h \ |
5 | poll.h xor.h clkdev.h exec.h | 5 | poll.h xor.h clkdev.h exec.h |
6 | generic-y += trace_clock.h | ||
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index a4fe15e33c6f..2d62b484b3fc 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild | |||
@@ -2,3 +2,4 @@ | |||
2 | 2 | ||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += rwsem.h | 4 | generic-y += rwsem.h |
5 | generic-y += trace_clock.h | ||
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 0633dc6d254d..f313f9cbcf44 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild | |||
@@ -1,3 +1,4 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += trace_clock.h | ||
diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index ec697aeefd05..16e41fe1a419 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild | |||
@@ -3,3 +3,4 @@ include include/asm-generic/Kbuild.asm | |||
3 | header-y += | 3 | header-y += |
4 | 4 | ||
5 | generic-y += clkdev.h | 5 | generic-y += clkdev.h |
6 | generic-y += trace_clock.h | ||
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index 29f83beeef7a..280bea9e5e2b 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild | |||
@@ -31,5 +31,6 @@ generic-y += socket.h | |||
31 | generic-y += statfs.h | 31 | generic-y += statfs.h |
32 | generic-y += termbits.h | 32 | generic-y += termbits.h |
33 | generic-y += termios.h | 33 | generic-y += termios.h |
34 | generic-y += trace_clock.h | ||
34 | generic-y += ucontext.h | 35 | generic-y += ucontext.h |
35 | generic-y += xor.h | 36 | generic-y += xor.h |
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index 645a58da0e86..e26d430ce2fd 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -8,4 +8,5 @@ generic-y += local64.h | |||
8 | generic-y += irq_regs.h | 8 | generic-y += irq_regs.h |
9 | generic-y += local.h | 9 | generic-y += local.h |
10 | generic-y += module.h | 10 | generic-y += module.h |
11 | generic-y += trace_clock.h | ||
11 | generic-y += word-at-a-time.h | 12 | generic-y += word-at-a-time.h |
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index 6948015e08a2..b17b9b8e53cd 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild | |||
@@ -34,5 +34,6 @@ generic-y += sockios.h | |||
34 | generic-y += statfs.h | 34 | generic-y += statfs.h |
35 | generic-y += termbits.h | 35 | generic-y += termbits.h |
36 | generic-y += termios.h | 36 | generic-y += termios.h |
37 | generic-y += trace_clock.h | ||
37 | generic-y += types.h | 38 | generic-y += types.h |
38 | generic-y += xor.h | 39 | generic-y += xor.h |
diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index 0f6e7b328265..b30f34a79882 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild | |||
@@ -2,3 +2,4 @@ generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h | |||
2 | generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h | 2 | generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h |
3 | generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h | 3 | generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h |
4 | generic-y += switch_to.h clkdev.h | 4 | generic-y += switch_to.h clkdev.h |
5 | generic-y += trace_clock.h | ||
diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index c910c9857e11..7be503e45695 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild | |||
@@ -54,6 +54,7 @@ generic-y += syscalls.h | |||
54 | generic-y += termbits.h | 54 | generic-y += termbits.h |
55 | generic-y += termios.h | 55 | generic-y += termios.h |
56 | generic-y += topology.h | 56 | generic-y += topology.h |
57 | generic-y += trace_clock.h | ||
57 | generic-y += types.h | 58 | generic-y += types.h |
58 | generic-y += ucontext.h | 59 | generic-y += ucontext.h |
59 | generic-y += unaligned.h | 60 | generic-y += unaligned.h |
diff --git a/arch/x86/include/asm/trace_clock.h b/arch/x86/include/asm/trace_clock.h new file mode 100644 index 000000000000..5c1652728b6d --- /dev/null +++ b/arch/x86/include/asm/trace_clock.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef _ASM_X86_TRACE_CLOCK_H | ||
2 | #define _ASM_X86_TRACE_CLOCK_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | #ifdef CONFIG_X86_TSC | ||
8 | |||
9 | extern u64 notrace trace_clock_x86_tsc(void); | ||
10 | |||
11 | # define ARCH_TRACE_CLOCKS \ | ||
12 | { trace_clock_x86_tsc, "x86-tsc" }, | ||
13 | |||
14 | #else /* !CONFIG_X86_TSC */ | ||
15 | |||
16 | #define ARCH_TRACE_CLOCKS | ||
17 | |||
18 | #endif | ||
19 | |||
20 | #endif /* _ASM_X86_TRACE_CLOCK_H */ | ||
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 9fd5eed3f8f5..34e923a53762 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -61,6 +61,7 @@ obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o | |||
61 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o | 61 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
62 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o | 62 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
63 | obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o | 63 | obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o |
64 | obj-$(CONFIG_X86_TSC) += trace_clock.o | ||
64 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o | 65 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o |
65 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o | 66 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o |
66 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o | 67 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o |
diff --git a/arch/x86/kernel/trace_clock.c b/arch/x86/kernel/trace_clock.c new file mode 100644 index 000000000000..25b993729f9b --- /dev/null +++ b/arch/x86/kernel/trace_clock.c | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * X86 trace clocks | ||
3 | */ | ||
4 | #include <asm/trace_clock.h> | ||
5 | #include <asm/barrier.h> | ||
6 | #include <asm/msr.h> | ||
7 | |||
8 | /* | ||
9 | * trace_clock_x86_tsc(): A clock that is just the cycle counter. | ||
10 | * | ||
11 | * Unlike the other clocks, this is not in nanoseconds. | ||
12 | */ | ||
13 | u64 notrace trace_clock_x86_tsc(void) | ||
14 | { | ||
15 | u64 ret; | ||
16 | |||
17 | rdtsc_barrier(); | ||
18 | rdtscll(ret); | ||
19 | |||
20 | return ret; | ||
21 | } | ||
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index 6d1302789995..095f0a2244f7 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild | |||
@@ -25,4 +25,5 @@ generic-y += siginfo.h | |||
25 | generic-y += statfs.h | 25 | generic-y += statfs.h |
26 | generic-y += termios.h | 26 | generic-y += termios.h |
27 | generic-y += topology.h | 27 | generic-y += topology.h |
28 | generic-y += trace_clock.h | ||
28 | generic-y += xor.h | 29 | generic-y += xor.h |
diff --git a/include/asm-generic/trace_clock.h b/include/asm-generic/trace_clock.h new file mode 100644 index 000000000000..6726f1bafb5e --- /dev/null +++ b/include/asm-generic/trace_clock.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _ASM_GENERIC_TRACE_CLOCK_H | ||
2 | #define _ASM_GENERIC_TRACE_CLOCK_H | ||
3 | /* | ||
4 | * Arch-specific trace clocks. | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * Additional trace clocks added to the trace_clocks | ||
9 | * array in kernel/trace/trace.c | ||
10 | * None if the architecture has not defined it. | ||
11 | */ | ||
12 | #ifndef ARCH_TRACE_CLOCKS | ||
13 | # define ARCH_TRACE_CLOCKS | ||
14 | #endif | ||
15 | |||
16 | #endif /* _ASM_GENERIC_TRACE_CLOCK_H */ | ||
diff --git a/include/linux/trace_clock.h b/include/linux/trace_clock.h index 4eb490237d4c..d563f37e1a1d 100644 --- a/include/linux/trace_clock.h +++ b/include/linux/trace_clock.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | #include <asm/trace_clock.h> | ||
16 | |||
15 | extern u64 notrace trace_clock_local(void); | 17 | extern u64 notrace trace_clock_local(void); |
16 | extern u64 notrace trace_clock(void); | 18 | extern u64 notrace trace_clock(void); |
17 | extern u64 notrace trace_clock_global(void); | 19 | extern u64 notrace trace_clock_global(void); |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c1434b5ce4d1..0d20620c0d27 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -488,6 +488,7 @@ static struct { | |||
488 | { trace_clock_local, "local" }, | 488 | { trace_clock_local, "local" }, |
489 | { trace_clock_global, "global" }, | 489 | { trace_clock_global, "global" }, |
490 | { trace_clock_counter, "counter" }, | 490 | { trace_clock_counter, "counter" }, |
491 | ARCH_TRACE_CLOCKS | ||
491 | }; | 492 | }; |
492 | 493 | ||
493 | int trace_clock_id; | 494 | int trace_clock_id; |