linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* help with porting perf lkm to later kernel
@ 2013-08-28  2:14 Chris Freehill
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Freehill @ 2013-08-28  2:14 UTC (permalink / raw)
  To: linux-perf-users

Hello,

I am trying to get my linux kernel module that extends perf support to
work in a later kernel version. The lkm had been working in 3.0.51.

In the new target kernel to which I am trying to port, 3.8.13, I get
warnings at the modpost stage complaining about symbols that can no
longer be found. If I attempt to load that module, I get errors saying
the same thing (those symbols can't be found).

The symbols that can't be found are

".perf_pmu_enable"
".perf_event_update_userpage"
".perf_pmu_disable"
".perf_event_overflow"
".perf_pmu_unregister"
".perf_pmu_register"

Does anyone have any tips or advice as to how code that calls these
previously working functions should now be handled when built against
later kernels?

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread
* help with porting perf lkm to later kernel
@ 2013-08-28 22:53 Chris Freehill
  2013-08-28 23:04 ` David Ahern
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Freehill @ 2013-08-28 22:53 UTC (permalink / raw)
  To: linux-perf-users

Another way to ask this, is why are these symbols no longer exported
(previously exported in core.c with EXPORT_SYMBOL_GPL), and how are
people who built lkm's using the previously existing interface
supposed to port them? Is it perhaps documented somewhere? I have not
been able to find this via google or in git comments.

Is this the wrong forum for this question (which I grant may be a
"newbie" question), or is there just no good answer?

thanks,
chris


> I am trying to get my linux kernel module that extends perf support to work
> in a later kernel version. The lkm had been working in 3.0.51.
>
> In the new target kernel to which I am trying to port, 3.8.13, I get
> warnings at the modpost stage complaining about symbols that can no longer
> be found. If I attempt to load that module, I get errors saying the same
> thing (those symbols can't be found).
>
> The symbols that can't be found are
>
> ".perf_pmu_enable"
>
> ".perf_event_update_userpage"
>
> ".perf_pmu_disable"
>
> ".perf_event_overflow"
>
> ".perf_pmu_unregister"
>
> ".perf_pmu_register"
>
> Does anyone have any tips or advice as to how code that calls these
> previously working functions should now be handled when built against later
> kernels?

^ permalink raw reply	[flat|nested] 5+ messages in thread
* help with porting perf lkm to later kernel
@ 2013-08-29 18:44 Chris Freehill
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Freehill @ 2013-08-29 18:44 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: David Ahern, linux-perf-users, Ingo Molnar,
	Arnaldo Carvalho de Melo

>> >>previously working functions should now be handled when built against later
>> >>kernels?
>
> # git show v3.0:kernel/events/core.c | grep EXPORT_SYMBOL
> EXPORT_SYMBOL_GPL(perf_event_release_kernel);
> EXPORT_SYMBOL_GPL(perf_event_read_value);
> EXPORT_SYMBOL_GPL(perf_register_guest_info_callbacks);
> EXPORT_SYMBOL_GPL(perf_unregister_guest_info_callbacks);
> EXPORT_SYMBOL_GPL(perf_swevent_get_recursion_context);
> EXPORT_SYMBOL_GPL(perf_tp_event);
> EXPORT_SYMBOL_GPL(perf_event_create_kernel_counter);
>
> IOW. how can your module have ever used those functions in 3.0 ?
>
> Typically the answer to 'why did the export get removed' is simply
> 'because there are no users'.
>

Thanks Peter and David. You set me on the right path.

Your answer made me check...surely enough, the kernel I had been using
was (unexpectedly to me) patched to export those symbols. I realize in
hindsight I should have checked that first.

Thanks again,
Chris

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

end of thread, other threads:[~2013-08-29 18:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28  2:14 help with porting perf lkm to later kernel Chris Freehill
  -- strict thread matches above, loose matches on Subject: below --
2013-08-28 22:53 Chris Freehill
2013-08-28 23:04 ` David Ahern
2013-08-29  6:59   ` Peter Zijlstra
2013-08-29 18:44 Chris Freehill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).