Thread (9 messages) 9 messages, 4 authors, 2021-02-11

Re: [PATCH] tools/perf: Fix powerpc gap between kernel end and module start

From: Arnaldo Carvalho de Melo <acme@kernel.org>
Date: 2021-02-03 15:34:23

Em Tue, Feb 02, 2021 at 04:02:36PM +0530, Athira Rajeev escreveu:

    On 18-Jan-2021, at 3:51 PM, kajoljain [off-list ref] wrote:



    On 1/12/21 3:08 PM, Jiri Olsa wrote:

        On Mon, Dec 28, 2020 at 09:14:14PM -0500, Athira Rajeev wrote:

        SNIP


            c000000002799370 b backtrace_flag
            c000000002799378 B radix_tree_node_cachep
            c000000002799380 B __bss_stop
            c0000000027a0000 B _end
            c008000003890000 t icmp_checkentry      [ip_tables]
            c008000003890038 t ipt_alloc_initial_table      [ip_tables]
            c008000003890468 T ipt_do_table [ip_tables]
            c008000003890de8 T ipt_unregister_table_pre_exit        [ip_tables]
            ...

            Perf calls function symbols__fixup_end() which sets the end of
            symbol
            to 0xc008000003890000, which is the next address and this is the
            start
            address of first module (icmp_checkentry in above) which will make
            the
            huge symbol size of 0x80000010f0000.

            After symbols__fixup_end:
            symbols__fixup_end: sym->name: _end, sym->start:
            0xc0000000027a0000,
            sym->end: 0xc008000003890000

            On powerpc, kernel text segment is located at 0xc000000000000000
            whereas the modules are located at very high memory addresses,
            0xc00800000xxxxxxx. Since the gap between end of kernel text
            segment
            and beginning of first module's address is high, histogram
            allocation
            using calloc fails.

            Fix this by detecting the kernel's last symbol and limiting
            the range of last kernel symbol to pagesize.


    Patch looks good to me.

    Tested-By: Kajol Jain[off-list ref]

    Thanks,
    Kajol Jain


            Signed-off-by: Athira Rajeev[off-list ref]


        I can't test, but since the same approach works for arm and s390,
        this also looks ok

        Acked-by: Jiri Olsa [off-list ref]

        thanks,
        jirka


Hi Arnaldo,

Can you please help review this patch and merge if this looks good..
Thanks, collected the Tested-by from Kajol and the Acked-by from Jiri
and applied to my local tree for testing, then up to my perf/core
branch.

- Arnaldo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help