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

2016-06-22 Thread Yury Norov
On Wed, Jun 22, 2016 at 09:20:43AM +0530, Madhavan Srinivasan wrote: > > > On Tuesday 21 June 2016 09:05 PM, Yury Norov wrote: > > On Tue, Jun 21, 2016 at 08:26:40PM +0530, Madhavan Srinivasan wrote: > >> When decoding the perf_regs mask in regs_dump__printf(), > >> we loop through the mask

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

2016-06-22 Thread Yury Norov
On Wed, Jun 22, 2016 at 09:20:43AM +0530, Madhavan Srinivasan wrote: > > > On Tuesday 21 June 2016 09:05 PM, Yury Norov wrote: > > On Tue, Jun 21, 2016 at 08:26:40PM +0530, Madhavan Srinivasan wrote: > >> When decoding the perf_regs mask in regs_dump__printf(), > >> we loop through the mask

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

2016-06-22 Thread Jiri Olsa
On Tue, Jun 21, 2016 at 06:35:31PM +0300, Yury Norov wrote: SNIP > > index 5214974e841a..1337b1c73f82 100644 > > --- a/tools/perf/util/session.c > > +++ b/tools/perf/util/session.c > > @@ -940,8 +940,22 @@ static void branch_stack__printf(struct perf_sample > > *sample) > > static void

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

2016-06-22 Thread Jiri Olsa
On Tue, Jun 21, 2016 at 06:35:31PM +0300, Yury Norov wrote: SNIP > > index 5214974e841a..1337b1c73f82 100644 > > --- a/tools/perf/util/session.c > > +++ b/tools/perf/util/session.c > > @@ -940,8 +940,22 @@ static void branch_stack__printf(struct perf_sample > > *sample) > > static void

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

2016-06-21 Thread Madhavan Srinivasan
On Tuesday 21 June 2016 09:05 PM, Yury Norov wrote: > On Tue, Jun 21, 2016 at 08:26:40PM +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. >> "mask" is of type "u64", but

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

2016-06-21 Thread Madhavan Srinivasan
On Tuesday 21 June 2016 09:05 PM, Yury Norov wrote: > On Tue, Jun 21, 2016 at 08:26:40PM +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. >> "mask" is of type "u64", but

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

2016-06-21 Thread Yury Norov
On Tue, Jun 21, 2016 at 08:26:40PM +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. > "mask" is of type "u64", but sent as a "unsigned long *" to > lib functions along with

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

2016-06-21 Thread Yury Norov
On Tue, Jun 21, 2016 at 08:26:40PM +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. > "mask" is of type "u64", but sent as a "unsigned long *" to > lib functions along with

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

2016-06-21 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. "mask" is of type "u64", but sent as a "unsigned long *" to lib functions along with sizeof(). While the exisitng code works fine in most of the case, the logic is

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

2016-06-21 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. "mask" is of type "u64", but sent as a "unsigned long *" to lib functions along with sizeof(). While the exisitng code works fine in most of the case, the logic is