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]

[HELP] could't get the global static var using @var


I want to use systemtap to watch the global shrinkers(global static
var) in mm/vmscan.c
The var is defined:
static LIST_HEAD(shrinker_list);

the script is here,:but semantic error: unresolved target-symbol
expression: operator '@var'.

vonnyfly@lfeng:~/kuaipan/code/stap$cat vmscan.stp
%{
#include <linux/list.h>
#include <linux/shrinker.h>
%}
function travel_shrinker:string(head:long) %{
        struct shrinker *s;
        list_for_each_entry(s,STAP_ARG_head,list){
                snprintf(STAP_RETVALUE,MAXSTRINGLEN,"%p\n",s->shrink);
        }
%}
probe begin{
        p = @var("shrinker_list@mm/vmscan.c")
        print(travel_shrinker(p));
}


vonnyfly@lfeng:~/kuaipan/code/stap$stap -v -g vmscan.stp
Pass 1: parsed user script and 91 library script(s) using
90712virt/25216res/2616shr/23316data kb, in 120usr/0sys/128real ms.
semantic error: unresolved target-symbol expression: operator '@var'
at vmscan.stp:12:6
        source:         p = @var("shrinker_list@mm/vmscan.c")
                            ^

Pass 2: analyzed script: 1 probe(s), 1 function(s), 1 embed(s), 0
global(s) using 91240virt/26272res/2980shr/23844data kb, in
10usr/0sys/6real ms.
Pass 2: analysis failed.  [man error::pass2]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.


vonnyfly@lfeng:~/kuaipan/code/stap$uname -a
Linux lfeng 3.9-1-amd64 #1 SMP Debian 3.9.6-1 x86_64 GNU/Linux

vonnyfly@lfeng:~/kuaipan/code/stap$stap --version
Systemtap translator/driver (version 2.2.1/0.153, Debian version 2.2.1-1)
Copyright (C) 2005-2013 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBSQLITE3 NSS TR1_UNORDERED_MAP NLS


How can I do to get the shrinker_list and get the every function pointer name?
thanks very much.
--
Thanks and Best Regards,
vonnyfly

Cell:13401157876
Email :lifeng1519@gmail.com
Addr: Rm. 911,DaYunCun,Zhichun Road,Haidian Districts Beijing,100191


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