This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
syscalltimes in examples
- From: linxz02 at ovi dot com
- To: systemtap at sourceware dot org
- Date: Wed, 22 Feb 2012 09:15:31 -0800 (PST)
- Subject: syscalltimes in examples
- Reply-to: linxz02 at ovi dot com
Hi All,
I'm using SystemTap-1.3. I was wondering whether I captured a bug in the example of syscalltimes.
When I run syscalltimes as it is, I see a bunch of errors saying unresolved types. It turned out that the following patch will work:
in around line 156:
# Check filters
if ('$FILTER') {
target = 0
++ ? ? ? ?if ('$F_UID') {
? ? ? ? ? ? if (pid() in f_pid) {
? ? ? ? ? ? ? ? timebypid[name, pid()] <<< delta
? ? ? ? ? ? ? ? target = 1
? ? ? ? ? ? }
++ ? ? ? ?}
++ ? ? ? if ('$F_PID') {
? ? ? ? ? ? if (uid() in f_uid) {
? ? ? ? ? ? ? ? timebyuid[name, uid()] <<< delta
? ? ? ? ? ? ? ? target = 1
? ? ? ? ? ? }
++ ? ? ?}
++ ? ? ? ?if ('$F_EXEC') {
? ? ? ? ? ? if (execname() in f_exec) {
? ? ? ? ? ? ? ? timebyexec[name, execname()] <<< delta
? ? ? ? ? ? ? ? target = 1
? ? ? ? ? ? }
?++ ? ? ? }
} else
target = 1
I guess the trick is that, say, if !'$F_UID', earlier code that uses f_pid will be statically eliminated. Therefore stap compiler is confused by the appearance of f_pid here.
Thoughts? Thanks.
-Felix