public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Li Guanglei <guanglei@cn.ibm.com>
To: "bibo,mao" <bibo.mao@intel.com>
Cc: systemtap@sources.redhat.com
Subject: Re: stucture element variable access problem
Date: Fri, 19 May 2006 03:21:00 -0000	[thread overview]
Message-ID: <446D39A3.1010102@cn.ibm.com> (raw)
In-Reply-To: <446D350E.6000303@intel.com>

bibo,mao 写道:
> Hi,
> I encountered such problem when access structure element variable, if
> the structure variable is pointer type, its element can be access, but
> if the variable is structure type, there will be tapset translation
> error when accessing its element. This is the test case:
> 
> It will be ok with this test case:
>     probe kernel.function("__elv_add_request")
>     {
>        if ($q->queue_tags){
>                tag_map = $q->queue_tags->tag_map
>                printf(" %d \n", tag_map);
>        }
>     }
> But this test case will fail:
>      probe kernel.function("__elv_add_request")
>     {
>        elevator_name = $q->elevator.elevator_name
>     }
> And there will be such error information:
> 
I checked into SystemTap CVS the tapsets used by LKET. Now you can use:
probe ioscheduler.elv_add_request
{
         printf("elv_name: %s\n", elevator_name)
}

I can't duplicate your errors on my box since my box used kernel 2.6.16.
For kernel >= 2.6.10, you should use: 
$q->elevator->elevator_type->elevator_name to get the name.

another comments is that you should use kernel_string to get the name.

  reply	other threads:[~2006-05-19  3:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19  3:02 bibo,mao
2006-05-19  3:21 ` Li Guanglei [this message]
2006-05-19  3:32 Mao, Bibo
2006-05-19  4:24 ` Li Guanglei
2006-05-19  4:52 Mao, Bibo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=446D39A3.1010102@cn.ibm.com \
    --to=guanglei@cn.ibm.com \
    --cc=bibo.mao@intel.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).