This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Probing symbols that are not EXPORT()ed


Alan David Brunelle ??:

global rqs

probe kernel.function("scsi_dispatch_cmd")
{
       rqs <<< $cmd->request_bufflen
}

Alan

There is already a probe alias defined in Systemtap for this.


/usr/share/systemtap/tapsets/scsi.stp:

...
/* Dispatch a command to the low-level driver. */
probe scsi.iodispatching
        = module("*").function("scsi_dispatch_cmd@drivers/scsi/scsi.c")
{

        host_no = $cmd->device->host->host_no
        channel = $cmd->device->channel
        lun = $cmd->device->lun
        dev_id = $cmd->device->id
        device_state = $cmd->device->sdev_state
        data_direction = $cmd->sc_data_direction
        request_buffer = $cmd->request_buffer
        req_bufflen = $cmd->request_bufflen
}
...

And this alias also have some predefined variables for you to use.

- Guanglei


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]