lkml.org 
[lkml]   [2023]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH V3 1/6] perf: Add branch stack extra
> I'm thinking we should do something like expose branch_counter_nr and
> branch_counter_width in the sysfs node, and then rename this extra field
> to counters.
>
> Then userspace can do something like:
>
> for (i = 0; i < branch_counter_nr; i++) {
> counter[i] = counters & ((1 << branch_counter_width) - 1);
> counters >>= branch_counter_width;
> }
>
> to extract the actual counter values.

perf script/report won't necessarily have access to the sysfs
values if they run on a different system

It would need extra PT style metadata written by perf record to
perf.data and read by the user tools.

Seems complicated. It would be better if it just parsed on its own.

-Andi

\
 
 \ /
  Last update: 2023-10-03 17:09    [W:0.351 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site