mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 23:53:55 +08:00
8aacf017b0
Add a simple trace clock called "uptime" for those that are interested in the uptime of the trace. It uses jiffies as that's the safest method, as other uptime clocks grab seq locks, which could cause a deadlock if taken from an event or function tracer. Requested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
24 lines
628 B
C
24 lines
628 B
C
#ifndef _LINUX_TRACE_CLOCK_H
|
|
#define _LINUX_TRACE_CLOCK_H
|
|
|
|
/*
|
|
* 3 trace clock variants, with differing scalability/precision
|
|
* tradeoffs:
|
|
*
|
|
* - local: CPU-local trace clock
|
|
* - medium: scalable global clock with some jitter
|
|
* - global: globally monotonic, serialized clock
|
|
*/
|
|
#include <linux/compiler.h>
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/trace_clock.h>
|
|
|
|
extern u64 notrace trace_clock_local(void);
|
|
extern u64 notrace trace_clock(void);
|
|
extern u64 notrace trace_clock_jiffies(void);
|
|
extern u64 notrace trace_clock_global(void);
|
|
extern u64 notrace trace_clock_counter(void);
|
|
|
|
#endif /* _LINUX_TRACE_CLOCK_H */
|