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: Getting at an address...


"Alan D. Brunelle" <Alan.Brunelle@hp.com> writes:

> I am working on trying to track down a potential hot lock used within
> the QLA device driver, and would like to sue STAP 

Oh no!  Call in the lawyers!

> [...] what I want is the address of
> $sp->lun_queue->fclun->fcport->ha->hardware_lock

OK.

> what follows "works" in that I think I get the address of
> $sp->lun_queue->fclun->fcport->ha [...]

Actually your function returns the address of a local copy of the
pointer.

But this should get you closer:

# %{
# #include <..../qla_def.h>  /* for scsi_qla_host */
# %}
#
# function hwl_addr:long (arg:long)
# %{
#         THIS->__retvalue = & ((struct scsi_qla_host *) (THIS->arg))->hardware_lock;
# %}
# 
# probe module("*").function("qla2x00_start_scsi")
# [...]
#         lockmap = hwl_addr($sp->lun_queue->fclun->fcport->ha)
# [...]


- FChE


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