[lkml]   [2011]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[tip:perf/core] ftrace: Avoid recording mcount on .init sections directly
    Commit-ID:  f0201738b61b1adcf6b2c4719c5c415745014c1c
    Author: Steven Rostedt <>
    AuthorDate: Tue, 12 Apr 2011 19:06:39 -0400
    Committer: Steven Rostedt <>
    CommitDate: Mon, 16 May 2011 14:46:30 -0400

    ftrace: Avoid recording mcount on .init sections directly

    The init and exit sections should not be traced and adding a call to
    mcount to them is a waste of text and instruction cache. Have the
    macro section attributes include notrace to ignore these functions
    for tracing from the build.

    Signed-off-by: Steven Rostedt <>
    include/linux/init.h | 14 +++++++-------
    1 files changed, 7 insertions(+), 7 deletions(-)

    diff --git a/include/linux/init.h b/include/linux/init.h
    index 577671c..9146f39 100644
    --- a/include/linux/init.h
    +++ b/include/linux/init.h
    @@ -79,29 +79,29 @@
    #define __exitused __used

    -#define __exit __section(.exit.text) __exitused __cold
    +#define __exit __section(.exit.text) __exitused __cold notrace

    /* Used for HOTPLUG */
    -#define __devinit __section(.devinit.text) __cold
    +#define __devinit __section(.devinit.text) __cold notrace
    #define __devinitdata __section(
    #define __devinitconst __section(.devinit.rodata)
    -#define __devexit __section(.devexit.text) __exitused __cold
    +#define __devexit __section(.devexit.text) __exitused __cold notrace
    #define __devexitdata __section(
    #define __devexitconst __section(.devexit.rodata)

    /* Used for HOTPLUG_CPU */
    -#define __cpuinit __section(.cpuinit.text) __cold
    +#define __cpuinit __section(.cpuinit.text) __cold notrace
    #define __cpuinitdata __section(
    #define __cpuinitconst __section(.cpuinit.rodata)
    -#define __cpuexit __section(.cpuexit.text) __exitused __cold
    +#define __cpuexit __section(.cpuexit.text) __exitused __cold notrace
    #define __cpuexitdata __section(
    #define __cpuexitconst __section(.cpuexit.rodata)

    /* Used for MEMORY_HOTPLUG */
    -#define __meminit __section(.meminit.text) __cold
    +#define __meminit __section(.meminit.text) __cold notrace
    #define __meminitdata __section(
    #define __meminitconst __section(.meminit.rodata)
    -#define __memexit __section(.memexit.text) __exitused __cold
    +#define __memexit __section(.memexit.text) __exitused __cold notrace
    #define __memexitdata __section(
    #define __memexitconst __section(.memexit.rodata)

     \ /
      Last update: 2011-05-18 20:37    [W:0.023 / U:118.200 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site