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]

accessing target globals with systemtap


Hi,

After reading the documentation, I assumed the following would result in the display of the address of the kernel global named arp_tbl:

[root@s01b06 jharan]# cat temp.stp
probe begin
{
        printf("arp_tbl %p\n", @var("arp_tbl@net/ipv4/arp.c"))
}

But when I try to compile it, I get this:

[root@s01b06 jharan]# stap -v -r 2.6.32-220.el6.x86_64 temp.stp -m temp -p 4
parse error: unknown statistic operator @var
        saw: identifier '@var' at temp.stp:3:25
     source:    printf("arp_tbl %p\n", @var("arp_tbl@net/ipv4/arp.c"))
                                       ^
parse error: expected statement
        saw: temp.stp EOF
2 parse errors.
Pass 1: parsed user script and 77 library script(s) using 97284virt/22908res/2984shr kb, in 140usr/0sys/144real ms.
Pass 1: parse failed.  Try again with another '--vp 1' option.
[root@s01b06 jharan]#

I am guessing that's because of my older version of stap:

[root@s01b06 jharan]# stap --version
Systemtap translator/driver (version 1.6/0.152 non-git sources)
Copyright (C) 2005-2011 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBRPM LIBSQLITE3 NSS BOOST_SHARED_PTR TR1_UNORDERED_MAP NLS
[root@s01b06 jharan]#

Is there a way for me to get access to a kernel global in my version of stap?
Or do I need to upgrade in order to do this?
Or am I missing something more basic?

Thanks,

Jeff Haran


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