lkml.org 
[lkml]   [2016]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] tools/perf: Fix the mask in regs_dump__printf and
On Mon, Jun 20, 2016 at 02:14:01PM +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 sizeof(). While the exisitng code works fine in
> most of the case, the logic is broken when using a 32bit perf on a
> 64bit kernel (Big Endian). We end up reading the wrong word of the u64
> first in the lib functions.

hum, I still don't see why this happens.. why do we read the
wrong word in this case?

thanks,
jirka

> first in the lib functions. Proposed fix is to swap the words of the
> u64 to handle this case. This is not endianess swap.
>

SNIP


\
 
 \ /
  Last update: 2016-06-20 12:01    [W:1.527 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site