Bug 447863

Summary: Systemtap/marker interface does not work on R2
Product: Red Hat Enterprise MRG Reporter: IBM Bug Proxy <bugproxy>
Component: realtime-kernelAssignee: Red Hat Real Time Maintenance <rt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: betaCC: bhu, rfdb
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: 2.6.24.7-62.el5rt Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-02 22:28:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix marker/stap interface none

Description IBM Bug Proxy 2008-05-22 07:08:22 UTC
=Comment: #0=================================================
Ankita Garg <ankigarg.com> - 2008-05-22 01:46 EDT
Problem description:

In the latest kernels, it is possible to hook up a systemtap probe to a kernel
marker. The patches to support this are present in the 2.6.25 based kernel. more
information can be found on the systemtap wiki:

http://sourceware.org/systemtap/wiki/UsingMarkers

3 patches are required to be applied to our 2.6.24 based kernels to support this
functionality. I applied these to R2 kernel and have the functionality working.
Attaching the patches here for reference. Support for this interface is a
_nice_to_have feature for the customer.
=Comment: #1=================================================
Ankita Garg <ankigarg.com> - 2008-05-22 01:47 EDT
Patch 1:
http://sourceware.org/systemtap/wiki/UsingMarkers?action=AttachFile&do=get&target=linux-kernel-markers-create-modpost-file.patch

Patch 2:
http://sourceware.org/systemtap/wiki/UsingMarkers?action=AttachFile&do=get&target=linux-kernel-markers-support-multiple-probes-update.patch

Patch 3:
http://sourceware.org/systemtap/wiki/UsingMarkers?action=AttachFile&do=get&target=linux-kernel-markers-support-multiple-probes.patch

Comment 1 IBM Bug Proxy 2008-05-29 06:16:28 UTC
------- Comment From ankigarg.com 2008-05-29 02:08 EDT-------
The patches have supposed to be present in -60 kernel (based on -rt11).
Verifying if the interface works now or not.

Comment 2 IBM Bug Proxy 2008-05-29 11:32:42 UTC
------- Comment From ankigarg.com 2008-05-29 07:26 EDT-------
I tried the systemtap marker interface on the latest -60 kernel and found that
it is not working. I confirm again that it is working on 2.6.25 based rt
kernels. The required patches are mentioned in comment #1. Posting them to the
mailing list.

------- Comment From ankigarg.com 2008-05-29 07:27 EDT-------
(In reply to comment #8)
> I tried the systemtap marker interface on the latest -60 kernel and found that
> it is not working. I confirm again that it is working on 2.6.25 based rt
> kernels. The required patches are mentioned in comment #1. Posting them to the
> mailing list.

Got to first generate patches against the latest RT kernel. Will send it once
that is done.

Comment 3 IBM Bug Proxy 2008-05-30 12:08:44 UTC
------- Comment From ankigarg.com 2008-05-30 08:07 EDT-------
Attaching the patch here. With this, the interface works fine.

Comment 4 IBM Bug Proxy 2008-05-30 12:16:37 UTC
Created attachment 307190 [details]
Fix marker/stap interface

Comment 5 IBM Bug Proxy 2008-06-01 11:56:34 UTC
------- Comment From ankigarg.com 2008-06-01 07:53 EDT-------
Patch from comment #11 has been pulled into -62 MRG kernel. Marking this as FAT.

Comment 6 IBM Bug Proxy 2008-06-02 06:24:33 UTC
------- Comment From ankigarg.com 2008-06-02 02:19 EDT-------
I have verified that this is resolved with the patch. The interface is working
fine in the -62 kernel. Closing this bug from our end.

------- Comment From ankigarg.com 2008-06-02 02:21 EDT-------
Sripathi, leaving it in ACCEPTED for you to close.

Comment 7 Clark Williams 2008-06-02 22:28:09 UTC
closing

Comment 8 Rick Berge 2010-01-29 22:41:14 UTC
I realize this is closed, but some problem crept in either with the final patch, or with patch stacking.

In kernel-rt-2.6.24.7-146, I see the following

% grep getopt *
marker-stap-interface-for-MRG.patch:-	while ((opt = getopt(argc, argv, "i:I:cmso:aw")) != -1) {
marker-stap-interface-for-MRG.patch:+	while ((opt = getopt(argc, argv, "i:I:mso:awM:K:")) != -1) {

I propose this additional patch:

--- linux-2.6.24.7.i686/scripts/mod/modpost.c
+++ linux-2.6.24.7.i686.new/scripts/mod/modpost.c
@@ -1810,7 +1810,7 @@
 	int opt;
 	int err;
 
-	while ((opt = getopt(argc, argv, "i:I:mso:awM:K:")) != -1) {
+	while ((opt = getopt(argc, argv, "i:I:cmso:awM:K:")) != -1) {
 		switch(opt) {
 			case 'i':
 				kernel_read = optarg;