Bug 5422 - iostat-scsi.stp instruments function removed in 2.6.24 kernel
Summary: iostat-scsi.stp instruments function removed in 2.6.24 kernel
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: testsuite (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-27 21:24 UTC by William Cohen
Modified: 2008-03-05 16:42 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
possible fix (650 bytes, patch)
2007-12-05 19:28 UTC, David Smith
Details | Diff
Add -g to test script (430 bytes, patch)
2008-03-05 09:39 UTC, Ananth Mavinakayanahalli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Cohen 2007-11-27 21:24:34 UTC
The iostat-scsi.stp tests fails because the sd_init_command() function is
removed from the most 2.6.24 kernel:

$  ../../install/bin/stap  -p4 ../../src/testsuite/../examples/iostat-scsi.stp 10
semantic error: no match while resolving probe point
kernel.function("sd_init_command")
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.


The following URL documents the patch to driver/scsi/sd.c that causes the problem:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7f9a6bc4e9d59e7fcf03ed23f60cd81ca5d80b65
Comment 1 David Smith 2007-12-05 19:28:42 UTC
Created attachment 2124 [details]
possible fix

Here's a patch that attempts to fix this example for 2.6.24.  Note that because
of the addition of the embedded C function, you have to add '-g' to the stap
command line.
Comment 2 Bruno Abinader 2008-03-03 21:43:43 UTC
The bug I'm commenting also affects iostat-scsi.stp behaviour on arm
architecture. iostat-scsi.stp fails with the following output:
$ stap -p4 iostat-scsi.stp 5 -vv
...
semantic error: no match while resolving probe point kernel.function("st_do_scsi")
Comment 3 Ananth Mavinakayanahalli 2008-03-04 08:25:03 UTC
David,
Your patch in comment 2 does fix the problem. Can you please commit it?

Bruno,
I see that st_do_scsi has been around since 2005 and still exists as of today's
Linus' git. Not sure why the symbol resolution failed.
Comment 4 Ananth Mavinakayanahalli 2008-03-05 09:39:18 UTC
Created attachment 2305 [details]
Add -g to test script

David,
This is needed to "PASS" the test when running make check.
Comment 5 David Smith 2008-03-05 16:41:50 UTC
I've checked both patches in.