[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7cjkp-NKVg9ktm6OkVn_tkrnHEP=_7muBHu1k-stxwYdOQ@mail.gmail.com>
Date: Tue, 26 Mar 2019 23:03:14 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: "liwei (GF)" <liwei391@...wei.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>,
Jiri Olsa <jolsa@...hat.com>, Jiri Olsa <jolsa@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
David Ahern <dsahern@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Kim Phillips <kim.phillips@....com>, guohanjun@...wei.com,
Li Bin <huawei.libin@...wei.com>
Subject: Re: [PATCH] perf machine: Update kernel map address and re-order properly
Hello,
On Tue, Mar 26, 2019 at 6:12 PM liwei (GF) <liwei391@...wei.com> wrote:
>
> Hi Arnaldo,
>
> Please shoot a glance at this modification, i think this issue is influential.
>
> On 2019/2/28 19:28, Jiri Olsa Wrote:
> > On Thu, Feb 28, 2019 at 05:20:03PM +0800, Wei Li wrote:
> >> Since commit 1fb87b8e9599 ("perf machine: Don't search for active kernel
> >> start in __machine__create_kernel_maps"), the __machine__create_kernel_maps()
> >> just create a map what start and end are both zero. Though the address will be
> >> updated later, the order of map in the rbtree may be incorrect.
> >>
> >> The commit ee05d21791db ("perf machine: Set main kernel end address properly")
> >> fixed the logic in machine__create_kernel_maps(), but it's still wrong in
> >> function machine__process_kernel_mmap_event().
> >>
> >> To reproduce this issue, we need an environment which the module address
> >> is before the kernel text segment. I tested it on an aarch64 machine with
> >> kernel 4.19.25:
> >
> > so that was the missing piece.. nice
> >
> >>
> >> [root@...alhost hulk]# grep _stext /proc/kallsyms
> >> ffff000008081000 T _stext
> >> [root@...alhost hulk]# grep _etext /proc/kallsyms
> >> ffff000009780000 R _etext
> >> [root@...alhost hulk]# tail /proc/modules
> >> hisi_sas_v2_hw 77824 0 - Live 0xffff00000191d000
> >> nvme_core 126976 7 nvme, Live 0xffff0000018b6000
> >> mdio 20480 1 ixgbe, Live 0xffff0000018ab000
> >> hisi_sas_main 106496 1 hisi_sas_v2_hw, Live 0xffff000001861000
> >> hns_mdio 20480 2 - Live 0xffff000001822000
> >> hnae 28672 3 hns_dsaf,hns_enet_drv, Live 0xffff000001815000
> >> dm_mirror 40960 0 - Live 0xffff000001804000
> >> dm_region_hash 32768 1 dm_mirror, Live 0xffff0000017f5000
> >> dm_log 32768 2 dm_mirror,dm_region_hash, Live 0xffff0000017e7000
> >> dm_mod 315392 17 dm_mirror,dm_log, Live 0xffff000001780000
> >> [root@...alhost hulk]#
> >>
> >> Before fix:
> >>
> >> [root@...alhost bin]# perf record sleep 3
> >> [ perf record: Woken up 1 times to write data ]
> >> [ perf record: Captured and wrote 0.011 MB perf.data (9 samples) ]
> >> [root@...alhost bin]# perf buildid-list -i perf.data
> >> 4c4e46c971ca935f781e603a09b52a92e8bdfee8 [vdso]
> >> [root@...alhost bin]# perf buildid-list -i perf.data -H
> >> 0000000000000000000000000000000000000000 /proc/kcore
> >> [root@...alhost bin]#
> >>
> >> After fix:
> >>
> >> [root@...alhost tools]# ./perf/perf record sleep 3
> >> [ perf record: Woken up 1 times to write data ]
> >> [ perf record: Captured and wrote 0.011 MB perf.data (9 samples) ]
> >> [root@...alhost tools]# ./perf/perf buildid-list -i perf.data
> >> 28a6c690262896dbd1b5e1011ed81623e6db0610 [kernel.kallsyms]
> >> 106c14ce6e4acea3453e484dc604d66666f08a2f [vdso]
> >> [root@...alhost tools]# ./perf/perf buildid-list -i perf.data -H
> >> 28a6c690262896dbd1b5e1011ed81623e6db0610 /proc/kcore
> >>
> >> Signed-off-by: Wei Li <liwei391@...wei.com>
> >
> > Acked-by: Jiri Olsa <jolsa@...nel.org>
Acked-by: Namhyung Kim <namhyung@...nel.org>
Thanks,
Namhyung
Powered by blists - more mailing lists