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]

syscalltimes in examples


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


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