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]

Simple(?) question


I'm trying to analyze something on RHEL5 GA (errata kernel), and I'm having problems getting a simple piece of histogram code to work. The following compiles & runs:

%{
#include <linux/blkdev.h>
%}
global rd_hist

probe kernel.function("__generic_unplug_device") {
       rd_hist <<< $q->rq.count[READ]
}

probe end {
       // print(@hist_log(rd_hist))
       exit()
}

(Note: the commented out print line.) If I put the commented line back in, I get:

%{
#include <linux/blkdev.h>
%}
global rd_hist

probe kernel.function("__generic_unplug_device") {
       rd_hist <<< $q->rq.count[READ]
}

probe end {
       print(@hist_log(rd_hist))
       exit()
}


# stap -vvvg adb-timo-hist.stp
SystemTap translator/driver (version 0.5.12 built 2007-01-01)
(Using Red Hat elfutils 0.125 libraries.)
Copyright (C) 2005-2006 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Created temporary directory "/tmp/stapWwILsB"
Searched '/usr/share/systemtap/tapset/2.6.18-8.1.1.el5/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6.18-8.1.1.el5/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6.18/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6.18/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/2.6/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/*.stp', match count 33
Searched '/usr/share/systemtap/tapset/LKET/2.6.18-8.1.1.el5/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6.18-8.1.1.el5/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6.18/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6.18/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/2.6/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/ia64/*.stp', match count 0
Searched '/usr/share/systemtap/tapset/LKET/*.stp', match count 19
Pass 1: parsed user script and 52 library script(s) in 290usr/22sys/313real ms.
parsed '__generic_unplug_device' -> func '__generic_unplug_device'
pattern 'kernel' matches module 'kernel'
focused on module 'kernel = [a000000100000000-a000000100d54c28, bias 0] file /usr/lib/debug/lib/modules/2.6.18-8.1.1.el5/vmlinux ELF machine ia64 (code 50)
pattern '__generic_unplug_device' matches function '__generic_unplug_device'
selected function __generic_unplug_device
prologue searching function '__generic_unplug_device' 0xa000000100281ac0-0xa000000100281b80@block/ll_rw_blk.c:1660
checking line record 0xa000000100281ac0@block/ll_rw_blk.c:1660
checking line record 0xa000000100281ad0@block/ll_rw_blk.c:1664
prologue found function '__generic_unplug_device' = 0xa000000100281ad0
probe __generic_unplug_device@block/ll_rw_blk.c:1660 kernel section=.text pc=0xa000000100281ac0
finding location for local 'q' near address a000000100281ac0, module bias 0
pattern 'kernel' matches module 'kernel'
Eliding unused function log
Eliding unused function warn
Eliding unused function error
Eliding unused function stp_print_binary
semantic error: unsupported type tag 19: identifier '$q' at adb-timo-hist.stp:7:14
semantic error: probe_1462 with invalid type long for operator '.' at adb-timo-hist.stp:7:20
Pass 2: analyzed script: 2 probe(s), 1 function(s), 1 embed(s), 1 global(s) in 459usr/178sys/652real ms.
Pass 2: analysis failed. Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapWwILsB



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