Re: [PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-17 Thread Jiri Olsa
On Fri, Jun 17, 2016 at 02:43:31PM +0530, Madhavan Srinivasan wrote: SNIP > > > if (data->user_regs.abi) { > - u64 mask = evsel->attr.sample_regs_user; > + u.val64 = evsel->attr.sample_regs_user; > > - sz = hwe

Re: [PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-17 Thread Madhavan Srinivasan
On Friday 17 June 2016 12:07 PM, Jiri Olsa wrote: > On Fri, Jun 17, 2016 at 10:52:38AM +0530, Madhavan Srinivasan wrote: >> When decoding the perf_regs mask in regs_dump__printf(), >> we loop through the mask using find_first_bit and find_next_bit functions. >> And mask is of type "u64". But "u64

Re: [PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-16 Thread Jiri Olsa
On Fri, Jun 17, 2016 at 10:52:38AM +0530, Madhavan Srinivasan wrote: > When decoding the perf_regs mask in regs_dump__printf(), > we loop through the mask using find_first_bit and find_next_bit functions. > And mask is of type "u64". But "u64" is send as a "unsigned long *" to > lib functions along

[PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-16 Thread Madhavan Srinivasan
When decoding the perf_regs mask in regs_dump__printf(), we loop through the mask using find_first_bit and find_next_bit functions. And mask is of type "u64". But "u64" is send as a "unsigned long *" to lib functions along with sizeof(). While the exisitng code works fine in most of the case, when