[PATCH] searching all Dwarf_Die for kernel.statement

Wenji Huang wenji.huang@oracle.com
Thu May 22 12:48:00 GMT 2008


Hi,
In recent systemtap source, the script kernel.statement(xxx) couldn't 
work well due to failing in founding matched probe point. Also the 
testcase systemtap.base/stmtvars.exp won't pass in machines. It came 
from the commit 6561773f763d40c00a115b53493ecf2d4f425d0d "PR5643: 
function caching for much faster syscall.* pass-2 processing".

The problem is like:

#stap -u -p2 -vve 'probe kernel.function("__kmalloc") {abc}'
SystemTap translator/driver (version 0.7/0.131 git branch master, commit 
dbb280c7)
Copyright (C) 2005-2008 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Created temporary directory "/tmp/stapvBKkFm"
Searched '/usr/local/share/systemtap/tapset/i686/*.stp', found 2
Searched '/usr/local/share/systemtap/tapset/*.stp', found 40
Pass 1: parsed user script and 42 library script(s) in 
380usr/40sys/421real ms.
probe __kmalloc@mm/slab.c:3747 kernel section=.text pc=0xc0140b30
semantic error: probe_1450 with unresolved type: identifier 'abc' at 
<input>:1:37

But if we run kernel.statement() with the pc equaling to the address of 
function __kmalloc

# stap -u -p2 -vve 'probe kernel.statement(0xc0140b30) {}'
SystemTap translator/driver (version 0.7/0.131 git branch master, commit 
dbb280c7)
Copyright (C) 2005-2008 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Created temporary directory "/tmp/stapV2mvpd"
Searched '/usr/local/share/systemtap/tapset/i686/*.stp', found 2
Searched '/usr/local/share/systemtap/tapset/*.stp', found 40
Pass 1: parsed user script and 42 library script(s) in 
420usr/30sys/453real ms.
semantic error: no match while resolving probe point 
kernel.statement(3222539056)
semantic error: no probes found

In fact, the probe point is there. The error message is not correct.
The following patch will solve the problem which enables searching all 
vectors in case of kernel.statement.

Best regards,
Wenji
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statement.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20080522/b4e2d477/attachment.bin>


More information about the Systemtap mailing list