This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
change the way we found matching tapsets
- From: Li Guanglei <guanglei at cn dot ibm dot com>
- To: "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Thu, 23 Feb 2006 17:06:20 +0800
- Subject: change the way we found matching tapsets
- Organization: IBM CSTL
Hi,
The syscall table for PowerPC changed from version to version. In
order to let LKET works for different kernel versions, I have to deal
with such changes in my tapsets.
Formerly I usually do that using the conditional preprocessing
offered by stap. But I found it will become hard to read and will
become unmaintainable as more kernel versions are involved. For
example, it's hard to use conditional preprocessing to define the
following scenario:
#if arch is ppc64 then
#if kernel_ver is 2.6.9 then
probe definitions
#elseif kernel_ver is 2.6.15.* then
probe definitions
#endif
#elseif arch is i686 then
...
#endif
So now I am thinking about using different directories for
different kernel versions. I found that the syscall table stays almost
the same for each major kernel version, e.g. the syscall table of all
2.6.15.* are the same. So I want a directory 2.6.15 to handles all
2.6.15.* versions(including 2.6.15.1, 2.6.15.2 etc).
But it seems that stap will found in this order:
Searched 'tapsets//2.6.15.4/ppc64/*.stp', match count 0
Searched 'tapsets//2.6.15.4/*.stp', match count 1
Searched 'tapsets//2.6/ppc64/*.stp', match count 0
Searched 'tapsets//2.6/*.stp', match count 0
It won't look at 2.6.15 directory. So can we change the behavior that
stap search for tapsets, so that I needn't to create the directories
like 2.6.15.1, 2.6.15.2 etc.