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...


Frank Ch. Eigler wrote:
"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!
:-)
s/sue/use/

[...] 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.
I thought so, but was hoping otherwise! :-)
But this should get you closer:

# %{
# #include <..../qla_def.h> /* for scsi_qla_host */
# %}
I actually tried this, but qla_def.h isn't "released" onto /usr/include/linux - so I'd have to reference the source copy directly...

Anyways, this seems to work - had to add in a (long) cast in hwl_addr...
#
# 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
Thanks - this will help narrow this down quickly!
Alan


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