Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * X86 trace clocks
0004  */
0005 #include <asm/trace_clock.h>
0006 #include <asm/barrier.h>
0007 #include <asm/msr.h>
0008 
0009 /*
0010  * trace_clock_x86_tsc(): A clock that is just the cycle counter.
0011  *
0012  * Unlike the other clocks, this is not in nanoseconds.
0013  */
0014 u64 notrace trace_clock_x86_tsc(void)
0015 {
0016     return rdtsc_ordered();
0017 }