Skip to contentSkip to conversation

x86: allow tracing of functions in arch/x86/kernel/rtc.c

PATCH Superseded David Vrabel 1 participant 4 messages Oct 5, 2012 – Oct 24, 2012 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/x86/kernel/Makefile |    1 -
 arch/x86/kernel/rtc.c    |    6 ------
 arch/x86/kernel/tsc.c    |    5 +++++
 3 files changed, 5 insertions(+), 7 deletions(-)
arch/x86/kernel/Makefile +0 -1
index 8215e56..19dd3a6 100644
@@ -9,7 +9,6 @@ CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
 CFLAGS_REMOVE_tsc.o = -pg
-CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_kvmclock.o = -pg
arch/x86/kernel/rtc.c +0 -6
index af6db6e..8ab7c62 100644
@@ -195,12 +195,6 @@ void read_persistent_clock(struct timespec *ts)
 	ts->tv_nsec = 0;
 }
 
-unsigned long long native_read_tsc(void)
-{
-	return __native_read_tsc();
-}
-EXPORT_SYMBOL(native_read_tsc);
-
 
 static struct resource rtc_resources[] = {
 	[0] = {
arch/x86/kernel/tsc.c +5 -0
index cfa5d4f..15e190a 100644
@@ -77,6 +77,11 @@ unsigned long long
 sched_clock(void) __attribute__((alias("native_sched_clock")));
 #endif
 
+unsigned long long native_read_tsc(void)
+{
+	return __native_read_tsc();
+}
+
 int check_tsc_unstable(void)
 {
 	return tsc_unstable;
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 2 lines · David Vrabel

Move native_read_tsc() to tsc.c to allow profiling to be re-enabled for rtc.c.

Sorry, dropped the EXPORT_SYMBOL() by mistake. I'll fix this and repost.

David

Quoted 33 lines
arch/x86/kernel/rtc.c +0 -6
index af6db6e..8ab7c62 100644
@@ -195,12 +195,6 @@ void read_persistent_clock(struct timespec *ts)
 	ts->tv_nsec = 0;
 }
 
-unsigned long long native_read_tsc(void)
-{
-	return __native_read_tsc();
-}
-EXPORT_SYMBOL(native_read_tsc);
-
 
 static struct resource rtc_resources[] = {
 	[0] = {
arch/x86/kernel/tsc.c +5 -0
index cfa5d4f..15e190a 100644
@@ -77,6 +77,11 @@ unsigned long long
 sched_clock(void) __attribute__((alias("native_sched_clock")));
 #endif
 
+unsigned long long native_read_tsc(void)
+{
+	return __native_read_tsc();
+}
+
 int check_tsc_unstable(void)
 {
 	return tsc_unstable;
#2 lore raw

PATCH v2 1/1 x86: allow tracing of functions in arch/x86/kernel/rtc.c

In reply to David Vrabel

Move native_read_tsc() to tsc.c to allow profiling to be re-enabled for rtc.c.

---
Changes in v2:
- re-add EXPORT_SYMBOL().

---
 arch/x86/kernel/Makefile |    1 -
 arch/x86/kernel/rtc.c    |    6 ------
 arch/x86/kernel/tsc.c    |    6 ++++++
 3 files changed, 6 insertions(+), 7 deletions(-)
arch/x86/kernel/Makefile +0 -1
index 8215e56..19dd3a6 100644
@@ -9,7 +9,6 @@ CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
 CFLAGS_REMOVE_tsc.o = -pg
-CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_kvmclock.o = -pg
arch/x86/kernel/rtc.c +0 -6
index af6db6e..8ab7c62 100644
@@ -195,12 +195,6 @@ void read_persistent_clock(struct timespec *ts)
 	ts->tv_nsec = 0;
 }
 
-unsigned long long native_read_tsc(void)
-{
-	return __native_read_tsc();
-}
-EXPORT_SYMBOL(native_read_tsc);
-
 
 static struct resource rtc_resources[] = {
 	[0] = {
arch/x86/kernel/tsc.c +6 -0
index cfa5d4f..06ccb50 100644
@@ -77,6 +77,12 @@ unsigned long long
 sched_clock(void) __attribute__((alias("native_sched_clock")));
 #endif
 
+unsigned long long native_read_tsc(void)
+{
+	return __native_read_tsc();
+}
+EXPORT_SYMBOL(native_read_tsc);
+
 int check_tsc_unstable(void)
 {
 	return tsc_unstable;
Signature · 1 line
1.7.2.5
#3 lore raw

[tip:perf/core] x86: Allow tracing of functions in arch/x86/kernel /rtc.c

Commit-ID:  ce37f400336a34bb6e72c4700f9dcc2a41ff7163
Gitweb:     http://git.kernel.org/tip/ce37f400336a34bb6e72c4700f9dcc2a41ff7163
Author:     David Vrabel <[email protected]>
AuthorDate: Mon, 8 Oct 2012 13:07:30 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 24 Oct 2012 13:14:22 +0200

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.

---
 arch/x86/kernel/Makefile |    1 -
 arch/x86/kernel/rtc.c    |    6 ------
 arch/x86/kernel/tsc.c    |    6 ++++++
 3 files changed, 6 insertions(+), 7 deletions(-)
arch/x86/kernel/Makefile +0 -1
index 91ce48f..9fd5eed 100644
@@ -9,7 +9,6 @@ CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
 ifdef CONFIG_FUNCTION_TRACER
 # Do not profile debug and lowlevel utilities
 CFLAGS_REMOVE_tsc.o = -pg
-CFLAGS_REMOVE_rtc.o = -pg
 CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
 CFLAGS_REMOVE_pvclock.o = -pg
 CFLAGS_REMOVE_kvmclock.o = -pg
arch/x86/kernel/rtc.c +0 -6
index 4929c1b..801602b 100644
@@ -195,12 +195,6 @@ void read_persistent_clock(struct timespec *ts)
 	ts->tv_nsec = 0;
 }
 
-unsigned long long native_read_tsc(void)
-{
-	return __native_read_tsc();
-}
-EXPORT_SYMBOL(native_read_tsc);
-
 
 static struct resource rtc_resources[] = {
 	[0] = {
arch/x86/kernel/tsc.c +6 -0
index cfa5d4f..06ccb50 100644
@@ -77,6 +77,12 @@ unsigned long long
 sched_clock(void) __attribute__((alias("native_sched_clock")));
 #endif
 
+unsigned long long native_read_tsc(void)
+{
+	return __native_read_tsc();
+}
+EXPORT_SYMBOL(native_read_tsc);
+
 int check_tsc_unstable(void)
 {
 	return tsc_unstable;