Re: [PATCH v4 2/2] perf: report/annotate: fix segfault problem.

2015-04-09 Thread Jiri Olsa
On Wed, Apr 08, 2015 at 03:52:18AM +, Wang Nan wrote: SNIP > > -bool is_kernel_module(const char *pathname) > +bool is_kernel_module(const char *pathname, int cpumode) > { > struct kmod_path m; > > - if (kmod_path__parse(&m, pathname)) > + if (kmod_path__parse(&m, pathname,

Re: [PATCH v4 2/2] perf: report/annotate: fix segfault problem.

2015-04-09 Thread Jiri Olsa
On Thu, Apr 09, 2015 at 03:05:27PM +0800, Wang Nan wrote: SNIP > When mmap event at kernel address space occures, it distinguishes kernel and > kernel module > according to the name in mmap event. Unfortunately, '[test_module]' won't be > regarded as kernel > at this time, so according map__kma

Re: [PATCH v4 2/2] perf: report/annotate: fix segfault problem.

2015-04-09 Thread Wang Nan
On 2015/4/8 21:59, Jiri Olsa wrote: > On Wed, Apr 08, 2015 at 03:52:18AM +, Wang Nan wrote: >> perf report and perf annotate are easy to trigger segfault if trace data >> contain kernel module information like this: >> >> # perf report -D -i ./perf.data >> ... >> 0 0 0x188 [0x50]: PERF_RECOR

Re: [PATCH v4 2/2] perf: report/annotate: fix segfault problem.

2015-04-08 Thread Jiri Olsa
On Wed, Apr 08, 2015 at 03:52:18AM +, Wang Nan wrote: > perf report and perf annotate are easy to trigger segfault if trace data > contain kernel module information like this: > > # perf report -D -i ./perf.data > ... > 0 0 0x188 [0x50]: PERF_RECORD_MMAP -1/0: [0xffbff1018000(0xf068000)

[PATCH v4 2/2] perf: report/annotate: fix segfault problem.

2015-04-07 Thread Wang Nan
perf report and perf annotate are easy to trigger segfault if trace data contain kernel module information like this: # perf report -D -i ./perf.data ... 0 0 0x188 [0x50]: PERF_RECORD_MMAP -1/0: [0xffbff1018000(0xf068000) @ 0]: x [test_module] ... # perf report -i ./perf.data --objdump=