Bug 459141

Summary: Add ftrace boot time nop replacement
Product: Red Hat Enterprise MRG Reporter: Steven Rostedt <srostedt>
Component: realtime-kernelAssignee: Steven Rostedt <srostedt>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: bhu, davids, lgoncalv, williams
Target Milestone: 1.0.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-07 19:21:05 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
patch for mcount record change to nop on boot up none

Description Steven Rostedt 2008-08-14 17:43:21 UTC
Created attachment 314335 [details]
patch for mcount record change to nop on boot up

I ported the ftrace nop replacement to the MRG kernel.

Currently the way dynamic ftrace works, is on boot up all calls to mcount are recorded. That is the calling site is recorded in a preallocated hash. Later a daemon wakes up, and if anything was recorded, it calls kstop machine and replaces the calling site to mcount with a nop.

This new approach adds code in the build system to make a table of all calling sites. On boot up, all the sites are converted into nops.

This is a much more reliable way to handle ftrace, and also this means that ftrace has virtually no overhead when configured in. The old daemon ran the risk of latencies when doing the kstop machine. This method does not need to use the daemon.

Kstop_machine is now only executed on enabling and disabling the function tracer.

Note: after adding the attached patch, the file
scripts/recordmcount.pl must be changed to executable.

  chmod +x scripts/recordmcount.pl

This may be needed to be done in the spec file.

Comment 1 Luis Claudio R. Goncalves 2008-08-21 14:17:58 UTC
Queued for -78

Comment 3 David Sommerseth 2008-09-23 17:19:39 UTC
Verified that the attached patch (https://bugzilla.redhat.com/attachment.cgi?id=314335) is implemented in mrg-rt-2.6.24.7-81 (mrg-rt.git commit 3073ec96e9608875a83cc57c1522b05f978134b2)

Comment 5 errata-xmlrpc 2008-10-07 19:21:05 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2008-0857.html