This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: systemtap with USB
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: tsjaseen <jaseen dot shamsuddin at wipro dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 02 Apr 2008 09:58:20 -0400
- Subject: Re: systemtap with USB
- References: <16442451.post@talk.nabble.com>
Hello,
tsjaseen wrote:
> Hello,
>
> I am trying with the systemtap tool to understand the USB subsystem. I've
> written basic script where the probe point is set for usb_register_driver.
>
> probe kernel.function("usb_register_driver")
>
> {
>
> print("Entering usb_register\n")
>
> }
>
> probe timer.ms(30000)
>
> {
>
> exit()
>
> }
>
> After executing this script i am inserting a USB flash due to which the
> usb-storage module gets loaded. Checked by doing lsmod.
>
> But the hook i've set here in the kernel is not getting the event at all.
Would you had inserted (and had removed) a usb flash before doing that?
If so, I guess the reason why is that 'usb_storage' module has been loaded before
running that script.
usb_register_driver() is invoked when a usb "client" module (ex. usb_storage.ko)
is loaded. And the kernel loads usb_storage when inserting a usb flash, but
it does not unload usb_storage when removing it.
So, before running the script, could you unload usb_storage?
$ /sbin/rmmod usb_storage
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com