• A
    arm64: ftrace: Add dynamic ftrace support · bd7d38db
    AKASHI Takahiro 提交于
    This patch allows "dynamic ftrace" if CONFIG_DYNAMIC_FTRACE is enabled.
    Here we can turn on and off tracing dynamically per-function base.
    
    On arm64, this is done by patching single branch instruction to _mcount()
    inserted by gcc -pg option. The branch is replaced to NOP initially at
    kernel start up, and later on, NOP to branch to ftrace_caller() when
    enabled or branch to NOP when disabled.
    Please note that ftrace_caller() is a counterpart of _mcount() in case of
    'static' ftrace.
    
    More details on architecture specific requirements are described in
    Documentation/trace/ftrace-design.txt.
    Acked-by: NWill Deacon <will.deacon@arm.com>
    Signed-off-by: NAKASHI Takahiro <takahiro.akashi@linaro.org>
    Signed-off-by: NWill Deacon <will.deacon@arm.com>
    bd7d38db
entry-ftrace.S 5.9 KB