Skip to content

Commit a00dc31

Browse files
Stephane Eranianacmel
authored andcommitted
perf record: Fix branch_stack type in perf_record_opts
The attr.branch_sample_type field is defined as u64 by the API. As such, we need to ensure the variable holding the value of the branch stack filters is also u64 otherwise we may lose bits in the future. Note also that the bogus definition of the field in perf_record_opts caused problems on big-endian PPC systems. Thanks to Anshuman Khandual for tracking the problem on PPC. Reported-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Stephane Eranian <eranian@google.com> Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20120525211344.GA7729@quad Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent c410431 commit a00dc31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/perf/perf.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ struct perf_record_opts {
227227
unsigned int freq;
228228
unsigned int mmap_pages;
229229
unsigned int user_freq;
230-
int branch_stack;
230+
u64 branch_stack;
231231
u64 default_interval;
232232
u64 user_interval;
233233
};

0 commit comments

Comments
 (0)