Skip to content

Commit ce37f40

Browse files
David VrabelIngo Molnar
authored andcommitted
x86: Allow tracing of functions in arch/x86/kernel/rtc.c
Move native_read_tsc() to tsc.c to allow profiling to be re-enabled for rtc.c. Signed-off-by: David Vrabel <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 3f3a206 commit ce37f40

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

arch/x86/kernel/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
99
ifdef CONFIG_FUNCTION_TRACER
1010
# Do not profile debug and lowlevel utilities
1111
CFLAGS_REMOVE_tsc.o = -pg
12-
CFLAGS_REMOVE_rtc.o = -pg
1312
CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
1413
CFLAGS_REMOVE_pvclock.o = -pg
1514
CFLAGS_REMOVE_kvmclock.o = -pg

arch/x86/kernel/rtc.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,6 @@ void read_persistent_clock(struct timespec *ts)
195195
ts->tv_nsec = 0;
196196
}
197197

198-
unsigned long long native_read_tsc(void)
199-
{
200-
return __native_read_tsc();
201-
}
202-
EXPORT_SYMBOL(native_read_tsc);
203-
204198

205199
static struct resource rtc_resources[] = {
206200
[0] = {

arch/x86/kernel/tsc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ unsigned long long
7777
sched_clock(void) __attribute__((alias("native_sched_clock")));
7878
#endif
7979

80+
unsigned long long native_read_tsc(void)
81+
{
82+
return __native_read_tsc();
83+
}
84+
EXPORT_SYMBOL(native_read_tsc);
85+
8086
int check_tsc_unstable(void)
8187
{
8288
return tsc_unstable;

0 commit comments

Comments
 (0)