lkml.org 
[lkml]   [2019]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 34/44] perf test vmlinux-kallsyms: Ignore aliases to _etext when searching on kallsyms
    Date
    From: Arnaldo Carvalho de Melo <acme@redhat.com>

    No need to search for aliases for the symbol that marks the end of the
    kernel text segment, the following patch will make such symbols not to
    be found when searching in the kallsyms maps causing this test to fail.

    So as a prep patch to avoid breaking bisection, ignore such symbols.

    Tested-by: Jiri Olsa <jolsa@kernel.org>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Song Liu <songliubraving@fb.com>
    Cc: Stanislav Fomichev <sdf@google.com>
    Cc: Thomas Richter <tmricht@linux.ibm.com>
    Link: https://lkml.kernel.org/n/tip-qfwuih8cvmk9doh7k5k244eq@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    ---
    tools/perf/tests/vmlinux-kallsyms.c | 9 ++++++++-
    1 file changed, 8 insertions(+), 1 deletion(-)

    diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
    index 7691980b7df1..f101576d1c72 100644
    --- a/tools/perf/tests/vmlinux-kallsyms.c
    +++ b/tools/perf/tests/vmlinux-kallsyms.c
    @@ -161,9 +161,16 @@ int test__vmlinux_matches_kallsyms(struct test *test __maybe_unused, int subtest

    continue;
    }
    - } else
    + } else if (mem_start == kallsyms.vmlinux_map->end) {
    + /*
    + * Ignore aliases to _etext, i.e. to the end of the kernel text area,
    + * such as __indirect_thunk_end.
    + */
    + continue;
    + } else {
    pr_debug("ERR : %#" PRIx64 ": %s not on kallsyms\n",
    mem_start, sym->name);
    + }

    err = -1;
    }
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-05-28 00:40    [W:2.917 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site