All of lore.kernel.org
 help / color / mirror / Atom feed
* Ftrace: tracing init call of out of tree modules
@ 2015-12-10 10:54 Jay Aurabind
  2015-12-10 13:19 ` Abel Vesa
  0 siblings, 1 reply; 3+ messages in thread
From: Jay Aurabind @ 2015-12-10 10:54 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I am learning ftrace. I would like to know to use frace filters for
tracing a module's init function.

For example, assume the module uvcvideo. While the module is loaded,

cat available_filter_functions | grep uvcvideo

will give me a big list of functions. Then I enable those functions by
setting ftrace filter with:

echo "uvc*" > set_ftrace_filter

However, as soon as I rmmod the driver, set_ftrace_filter becomes
empty automatically.

So how do I do a trace on out-of-tree modules I have ?


-- 

Thanks and Regards,
Aurabindo J

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

* Ftrace: tracing init call of out of tree modules
  2015-12-10 10:54 Ftrace: tracing init call of out of tree modules Jay Aurabind
@ 2015-12-10 13:19 ` Abel Vesa
  2015-12-11 10:14   ` Jay Aurabind
  0 siblings, 1 reply; 3+ messages in thread
From: Abel Vesa @ 2015-12-10 13:19 UTC (permalink / raw)
  To: kernelnewbies



> However, as soon as I rmmod the driver, set_ftrace_filter becomes
> empty automatically.

Out-of-tree means the module is not build together with the kernel.

> 
> So how do I do a trace on out-of-tree modules I have ?
> 

If you built your driver without building it together with the kernel, 
you can trace it as any other module after you insmod it.

Cheers,
Abel

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

* Ftrace: tracing init call of out of tree modules
  2015-12-10 13:19 ` Abel Vesa
@ 2015-12-11 10:14   ` Jay Aurabind
  0 siblings, 0 replies; 3+ messages in thread
From: Jay Aurabind @ 2015-12-11 10:14 UTC (permalink / raw)
  To: kernelnewbies

On 10 December 2015 at 18:49, Abel Vesa <abelvesa@gmail.com> wrote:
>
>
>> However, as soon as I rmmod the driver, set_ftrace_filter becomes
>> empty automatically.
>
> Out-of-tree means the module is not build together with the kernel.
>
>>
>> So how do I do a trace on out-of-tree modules I have ?
>>
>
> If you built your driver without building it together with the kernel,
> you can trace it as any other module after you insmod it.
>
> Cheers,
> Abel

I would like to know about both the cases - in tree and out of tree modules:

Assume that  I have an in-tree module, and I need to do tracing on it
right from the start, including its init. Those functions are only
detected in available_filter_functions if the module is inserted. If
the module i already inserted, I cant trace the init function anymore
since the init has already finished.

What is the solution with ftrace? Or should I resort to some other
tracing tool ?

-- 

Thanks and Regards,
Aurabindo J

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

end of thread, other threads:[~2015-12-11 10:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-10 10:54 Ftrace: tracing init call of out of tree modules Jay Aurabind
2015-12-10 13:19 ` Abel Vesa
2015-12-11 10:14   ` Jay Aurabind

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.