All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs
@ 2010-03-11  7:30 Xiao Guangrong
  2010-03-11  8:39 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Xiao Guangrong @ 2010-03-11  7:30 UTC (permalink / raw)
  To: Ingo Molnar, Frederic Weisbecker, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo, LKML

Export perf_trace_regs and perf_arch_fetch_caller_regs since module will
use these

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
 arch/x86/kernel/cpu/perf_event.c |    1 +
 kernel/trace/trace_event_perf.c  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 4a0514d..8700643 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1697,3 +1697,4 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski
 	regs->cs = __KERNEL_CS;
 	local_save_flags(regs->flags);
 }
+EXPORT_SYMBOL_GPL(perf_arch_fetch_caller_regs);
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
index f315b12..af4621b 100644
--- a/kernel/trace/trace_event_perf.c
+++ b/kernel/trace/trace_event_perf.c
@@ -10,6 +10,7 @@
 #include "trace.h"
 
 DEFINE_PER_CPU(struct pt_regs, perf_trace_regs);
+EXPORT_SYMBOL_GPL(perf_trace_regs);
 
 static char *perf_trace_buf;
 static char *perf_trace_buf_nmi;
-- 
1.6.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs
  2010-03-11  7:30 [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs Xiao Guangrong
@ 2010-03-11  8:39 ` Peter Zijlstra
  2010-03-11  9:02 ` Christoph Hellwig
  2010-03-11 14:41 ` [tip:perf/urgent] " tip-bot for Xiao Guangrong
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Zijlstra @ 2010-03-11  8:39 UTC (permalink / raw)
  To: Xiao Guangrong
  Cc: Ingo Molnar, Frederic Weisbecker, Paul Mackerras,
	Arnaldo Carvalho de Melo, LKML

On Thu, 2010-03-11 at 15:30 +0800, Xiao Guangrong wrote:
>  #include "trace.h"
>  
>  DEFINE_PER_CPU(struct pt_regs, perf_trace_regs);
> +EXPORT_SYMBOL_GPL(perf_trace_regs);

Shouldn't that be:

EXPORT_PER_CPU_SYMBOL_GPL(perf_trace_regs); ?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs
  2010-03-11  7:30 [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs Xiao Guangrong
  2010-03-11  8:39 ` Peter Zijlstra
@ 2010-03-11  9:02 ` Christoph Hellwig
  2010-03-11  9:10   ` Peter Zijlstra
  2010-03-11 14:41 ` [tip:perf/urgent] " tip-bot for Xiao Guangrong
  2 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2010-03-11  9:02 UTC (permalink / raw)
  To: Xiao Guangrong
  Cc: Ingo Molnar, Frederic Weisbecker, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo, LKML

On Thu, Mar 11, 2010 at 03:30:35PM +0800, Xiao Guangrong wrote:
> Export perf_trace_regs and perf_arch_fetch_caller_regs since module will
> use these

What modules exactly?  Uusually you add the export together with the
series adding the users.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs
  2010-03-11  9:02 ` Christoph Hellwig
@ 2010-03-11  9:10   ` Peter Zijlstra
  2010-03-11  9:14     ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Zijlstra @ 2010-03-11  9:10 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Xiao Guangrong, Ingo Molnar, Frederic Weisbecker, Paul Mackerras,
	Arnaldo Carvalho de Melo, LKML

On Thu, 2010-03-11 at 04:02 -0500, Christoph Hellwig wrote:
> On Thu, Mar 11, 2010 at 03:30:35PM +0800, Xiao Guangrong wrote:
> > Export perf_trace_regs and perf_arch_fetch_caller_regs since module will
> > use these
> 
> What modules exactly?  Uusually you add the export together with the
> series adding the users.

Pretty much all modular tracepoint users I think, I just got this from a
pp64_defconfig build:

ERROR: "perf_trace_regs" [fs/xfs/xfs.ko] undefined!
ERROR: ".perf_arch_fetch_caller_regs" [fs/xfs/xfs.ko] undefined!
ERROR: "perf_trace_regs" [arch/powerpc/platforms/cell/spufs/spufs.ko] undefined!
ERROR: ".perf_arch_fetch_caller_regs" [arch/powerpc/platforms/cell/spufs/spufs.ko] undefined!


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs
  2010-03-11  9:10   ` Peter Zijlstra
@ 2010-03-11  9:14     ` Christoph Hellwig
  2010-03-11 14:18       ` Frederic Weisbecker
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2010-03-11  9:14 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Christoph Hellwig, Xiao Guangrong, Ingo Molnar,
	Frederic Weisbecker, Paul Mackerras, Arnaldo Carvalho de Melo,
	LKML

On Thu, Mar 11, 2010 at 10:10:51AM +0100, Peter Zijlstra wrote:
> Pretty much all modular tracepoint users I think, I just got this from a
> pp64_defconfig build:

Interesting, that doesn't happen in mainline yet.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs
  2010-03-11  9:14     ` Christoph Hellwig
@ 2010-03-11 14:18       ` Frederic Weisbecker
  0 siblings, 0 replies; 7+ messages in thread
From: Frederic Weisbecker @ 2010-03-11 14:18 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Peter Zijlstra, Xiao Guangrong, Ingo Molnar, Paul Mackerras,
	Arnaldo Carvalho de Melo, LKML

On Thu, Mar 11, 2010 at 04:14:44AM -0500, Christoph Hellwig wrote:
> On Thu, Mar 11, 2010 at 10:10:51AM +0100, Peter Zijlstra wrote:
> > Pretty much all modular tracepoint users I think, I just got this from a
> > pp64_defconfig build:
> 
> Interesting, that doesn't happen in mainline yet.
> 


Yeah, it's in -tip.

Thanks guys for this fix. I think I'm unable to remind
there are modules in the kernel, I'm not counting anymore
the number of times I forget to export symbols for modules.

May be I should start to stick posters with photos of modules
entitled "I want to believe" everywhere in my flat.
Or perhaps I'm going to buy electronic glasses that display
modules advertizing in the street. I'm not sure yet but I'll
find a way.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [tip:perf/urgent] perf: export perf_trace_regs and perf_arch_fetch_caller_regs
  2010-03-11  7:30 [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs Xiao Guangrong
  2010-03-11  8:39 ` Peter Zijlstra
  2010-03-11  9:02 ` Christoph Hellwig
@ 2010-03-11 14:41 ` tip-bot for Xiao Guangrong
  2 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Xiao Guangrong @ 2010-03-11 14:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, xiaoguangrong, tglx, mingo

Commit-ID:  639fe4b12f92b54c9c3b38c82cdafaa38cfd3e63
Gitweb:     http://git.kernel.org/tip/639fe4b12f92b54c9c3b38c82cdafaa38cfd3e63
Author:     Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
AuthorDate: Thu, 11 Mar 2010 15:30:35 +0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 11 Mar 2010 15:21:29 +0100

perf: export perf_trace_regs and perf_arch_fetch_caller_regs

Export perf_trace_regs and perf_arch_fetch_caller_regs since module will
use these.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
[ use EXPORT_PER_CPU_SYMBOL_GPL() ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4B989C1B.2090407@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/cpu/perf_event.c |    1 +
 kernel/trace/trace_event_perf.c  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 5fb490c..7645fae 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1713,3 +1713,4 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski
 	regs->cs = __KERNEL_CS;
 	local_save_flags(regs->flags);
 }
+EXPORT_SYMBOL_GPL(perf_arch_fetch_caller_regs);
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
index f315b12..0709e4f 100644
--- a/kernel/trace/trace_event_perf.c
+++ b/kernel/trace/trace_event_perf.c
@@ -10,6 +10,7 @@
 #include "trace.h"
 
 DEFINE_PER_CPU(struct pt_regs, perf_trace_regs);
+EXPORT_PER_CPU_SYMBOL_GPL(perf_trace_regs);
 
 static char *perf_trace_buf;
 static char *perf_trace_buf_nmi;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-11 14:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11  7:30 [PATCH] perf: export perf_trace_regs and perf_arch_fetch_caller_regs Xiao Guangrong
2010-03-11  8:39 ` Peter Zijlstra
2010-03-11  9:02 ` Christoph Hellwig
2010-03-11  9:10   ` Peter Zijlstra
2010-03-11  9:14     ` Christoph Hellwig
2010-03-11 14:18       ` Frederic Weisbecker
2010-03-11 14:41 ` [tip:perf/urgent] " tip-bot for Xiao Guangrong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.