Bug 459141 - Add ftrace boot time nop replacement
Add ftrace boot time nop replacement
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel (Show other bugs)
All Linux
medium Severity medium
: 1.0.3
: ---
Assigned To: Steven Rostedt
Depends On:
  Show dependency treegraph
Reported: 2008-08-14 13:43 EDT by Steven Rostedt
Modified: 2008-10-07 15:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-07 15:21:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for mcount record change to nop on boot up (24.84 KB, patch)
2008-08-14 13:43 EDT, Steven Rostedt
no flags Details | Diff

  None (edit)
Description Steven Rostedt 2008-08-14 13:43:21 EDT
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 10:17:58 EDT
Queued for -78
Comment 3 David Sommerseth 2008-09-23 13:19:39 EDT
Verified that the attached patch (https://bugzilla.redhat.com/attachment.cgi?id=314335) is implemented in mrg-rt- (mrg-rt.git commit 3073ec96e9608875a83cc57c1522b05f978134b2)
Comment 5 errata-xmlrpc 2008-10-07 15:21:05 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.