Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-09 Thread Arnaldo Carvalho de Melo
Em Wed, Sep 09, 2015 at 01:06:40PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 01:35:10PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-09 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 01:35:10PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Right now we don't have that much use for the other

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-09 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 01:35:10PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Right now we don't have that much use for the other

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-09 Thread Arnaldo Carvalho de Melo
Em Wed, Sep 09, 2015 at 01:06:40PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 01:35:10PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 12:49:10PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Tue, Sep 08, 2015 at 05:34:56PM +0200, Jiri Olsa

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 12:49:10PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 05:34:56PM +0200, Jiri Olsa escreveu: > > > On Tue, Sep 08, 2015 at 12:18:13PM -0300, Arnaldo Carvalho de Melo

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 12:49:10PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 05:34:56PM +0200, Jiri Olsa escreveu: > > On Tue, Sep 08, 2015 at 12:18:13PM -0300, Arnaldo Carvalho de Melo wrote: > > > Humm, I think that we can have a pointer to the current perf_env, be it >

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Tue, Sep 08, 2015 at 12:18:13PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 08, 2015 at 09:37:47AM +0200, Jiri Olsa escreveu: > > On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > > > SNIP > > > > > > > > I found the problem. > > > > > > perf relies on

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 09:37:47AM +0200, Jiri Olsa escreveu: > On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > SNIP > > > > > I found the problem. > > > > perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It > > depend on > > the existance of > > > >

RE: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Liang, Kan
> > On 2015/9/8 15:37, Jiri Olsa wrote: > > On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > > > SNIP > > > >> I found the problem. > >> > >> perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. > >> It depend on the existance of > >> > >>

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Tue, Sep 08, 2015 at 09:16:31PM +0800, pi3orama wrote: SNIP > >> Now I understand your suggestion. You mean we can build env->cpu before > >> processing the first sample, then init al.socket using that map instead > > > > hum, that should be the case anyway.. features are read before events

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread pi3orama
发自我的 iPhone > 在 2015年9月8日,下午9:13,Jiri Olsa 写道: > >> On Tue, Sep 08, 2015 at 04:12:55PM +0800, Wangnan (F) wrote: >> >> >>> On 2015/9/8 15:37, Jiri Olsa wrote: >>> On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: >>> >>> SNIP >>> I found the problem. perf relies

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Tue, Sep 08, 2015 at 04:12:55PM +0800, Wangnan (F) wrote: > > > On 2015/9/8 15:37, Jiri Olsa wrote: > >On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > > >SNIP > > > >>I found the problem. > >> > >>perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It >

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Wangnan (F)
On 2015/9/8 15:37, Jiri Olsa wrote: On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: SNIP I found the problem. perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It depend on the existance of /sys/devices/system/cpu/cpu%d/topology/core_siblings_list

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: SNIP > > I found the problem. > > perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It > depend on > the existance of > > /sys/devices/system/cpu/cpu%d/topology/core_siblings_list > > However, CPU can be

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: SNIP > > I found the problem. > > perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It > depend on > the existance of > > /sys/devices/system/cpu/cpu%d/topology/core_siblings_list > > However, CPU can be

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Wangnan (F)
On 2015/9/8 15:37, Jiri Olsa wrote: On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: SNIP I found the problem. perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It depend on the existance of /sys/devices/system/cpu/cpu%d/topology/core_siblings_list

RE: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Liang, Kan
> > On 2015/9/8 15:37, Jiri Olsa wrote: > > On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > > > SNIP > > > >> I found the problem. > >> > >> perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. > >> It depend on the existance of > >> > >>

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread pi3orama
发自我的 iPhone > 在 2015年9月8日,下午9:13,Jiri Olsa 写道: > >> On Tue, Sep 08, 2015 at 04:12:55PM +0800, Wangnan (F) wrote: >> >> >>> On 2015/9/8 15:37, Jiri Olsa wrote: >>> On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: >>> >>> SNIP >>> I found the problem.

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Tue, Sep 08, 2015 at 04:12:55PM +0800, Wangnan (F) wrote: > > > On 2015/9/8 15:37, Jiri Olsa wrote: > >On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > > >SNIP > > > >>I found the problem. > >> > >>perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It >

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Tue, Sep 08, 2015 at 09:16:31PM +0800, pi3orama wrote: SNIP > >> Now I understand your suggestion. You mean we can build env->cpu before > >> processing the first sample, then init al.socket using that map instead > > > > hum, that should be the case anyway.. features are read before events

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Jiri Olsa
On Tue, Sep 08, 2015 at 12:18:13PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 08, 2015 at 09:37:47AM +0200, Jiri Olsa escreveu: > > On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > > > SNIP > > > > > > > > I found the problem. > > > > > > perf relies on

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 12:49:10PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 05:34:56PM +0200, Jiri Olsa escreveu: > > On Tue, Sep 08, 2015 at 12:18:13PM -0300, Arnaldo Carvalho de Melo wrote: > > > Humm, I think that we can have a pointer to the current perf_env, be it >

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 01:13:59PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 12:49:10PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Tue, Sep 08, 2015 at 05:34:56PM +0200, Jiri Olsa

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 12:58:31PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 08, 2015 at 12:49:10PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Sep 08, 2015 at 05:34:56PM +0200, Jiri Olsa escreveu: > > > On Tue, Sep 08, 2015 at 12:18:13PM -0300, Arnaldo Carvalho de Melo

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-08 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 08, 2015 at 09:37:47AM +0200, Jiri Olsa escreveu: > On Mon, Sep 07, 2015 at 09:27:26PM +0800, Wangnan (F) wrote: > > SNIP > > > > > I found the problem. > > > > perf relies on build_cpu_topology() to fetch CPU_TOPOLOGY from sysfs. It > > depend on > > the existance of > > > >

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Wangnan (F)
On 2015/9/7 20:51, Wang Nan wrote: [SNIP] Although theoretically CPU_TOPOLOGY feature should always be selected by 'perf record', I did generate a perf.data without that feature. It has header like this: # perf report -i ./bad.perf.data --header-only # # captured on: Thu

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Wangnan (F)
On 2015/9/7 21:03, Jiri Olsa wrote: On Mon, Sep 07, 2015 at 12:51:55PM +, Wang Nan wrote: Commit e1e499aba570a2ea84d29822b7ea637ac41d9a51 (perf tools: Add processor socket info to hist_entry and addr_location) reads env->cpu array for each sample using index al.cpu. However, al.cpu can be

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Jiri Olsa
On Mon, Sep 07, 2015 at 12:51:55PM +, Wang Nan wrote: > Commit e1e499aba570a2ea84d29822b7ea637ac41d9a51 (perf tools: Add > processor socket info to hist_entry and addr_location) reads env->cpu > array for each sample using index al.cpu. However, al.cpu can be -1 if > sample doesn't select

[PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Wang Nan
Commit e1e499aba570a2ea84d29822b7ea637ac41d9a51 (perf tools: Add processor socket info to hist_entry and addr_location) reads env->cpu array for each sample using index al.cpu. However, al.cpu can be -1 if sample doesn't select PERF_SAMPLE_CPU. Also, env->cpu can be invalid if feature CPU_TOPOLOGY

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Jiri Olsa
On Mon, Sep 07, 2015 at 12:51:55PM +, Wang Nan wrote: > Commit e1e499aba570a2ea84d29822b7ea637ac41d9a51 (perf tools: Add > processor socket info to hist_entry and addr_location) reads env->cpu > array for each sample using index al.cpu. However, al.cpu can be -1 if > sample doesn't select

[PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Wang Nan
Commit e1e499aba570a2ea84d29822b7ea637ac41d9a51 (perf tools: Add processor socket info to hist_entry and addr_location) reads env->cpu array for each sample using index al.cpu. However, al.cpu can be -1 if sample doesn't select PERF_SAMPLE_CPU. Also, env->cpu can be invalid if feature CPU_TOPOLOGY

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Wangnan (F)
On 2015/9/7 20:51, Wang Nan wrote: [SNIP] Although theoretically CPU_TOPOLOGY feature should always be selected by 'perf record', I did generate a perf.data without that feature. It has header like this: # perf report -i ./bad.perf.data --header-only # # captured on: Thu

Re: [PATCH] perf report: Fix invalid memory accessing

2015-09-07 Thread Wangnan (F)
On 2015/9/7 21:03, Jiri Olsa wrote: On Mon, Sep 07, 2015 at 12:51:55PM +, Wang Nan wrote: Commit e1e499aba570a2ea84d29822b7ea637ac41d9a51 (perf tools: Add processor socket info to hist_entry and addr_location) reads env->cpu array for each sample using index al.cpu. However, al.cpu can be