powerpc/ftrace: add powerpc timebase as a trace clock source
Add a new powerpc-specific trace clock using the timebase register, similar to x86-tsc. This gives us - a fast, monotonic, hardware clock source for trace entries, and - a clock that can be used to correlate events across cpus as well as across hypervisor and guests. Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
35a7f41cc6
commit
197165d449
@@ -118,6 +118,7 @@ obj-$(CONFIG_PPC_IO_WORKAROUNDS) += io-workarounds.o
|
||||
obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
|
||||
obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
|
||||
obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
|
||||
obj-$(CONFIG_TRACING) += trace_clock.o
|
||||
|
||||
ifneq ($(CONFIG_PPC_INDIRECT_PIO),y)
|
||||
obj-y += iomap.o
|
||||
|
15
arch/powerpc/kernel/trace_clock.c
Normal file
15
arch/powerpc/kernel/trace_clock.c
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Copyright (C) 2015 Naveen N. Rao, IBM Corporation
|
||||
*/
|
||||
|
||||
#include <asm/trace_clock.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
u64 notrace trace_clock_ppc_tb(void)
|
||||
{
|
||||
return get_tb();
|
||||
}
|
Reference in New Issue
Block a user