lkml.org 
[lkml]   [2015]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/9] perf: Add cycles to branch_info
    Date
    From: Andi Kleen <ak@linux.intel.com>

    Skylake supports reporting the time in cycles a branch in the LBR
    took, to give a rough indication of the basic block performance.

    Export the cycle information in the branch_info structure.
    This can be done by just reusing some currently zero padding.

    This is just the generic header change. The architecture
    still needs to fill it in.

    There's no attempt to convert to real time, as we really
    want cycles here.

    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    ---
    include/uapi/linux/perf_event.h | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
    index 309211b..9ef489e 100644
    --- a/include/uapi/linux/perf_event.h
    +++ b/include/uapi/linux/perf_event.h
    @@ -904,6 +904,7 @@ union perf_mem_data_src {
    *
    * in_tx: running in a hardware transaction
    * abort: aborting a hardware transaction
    + * cycles: cycles from last branch (or 0 if not supported)
    */
    struct perf_branch_entry {
    __u64 from;
    @@ -912,7 +913,8 @@ struct perf_branch_entry {
    predicted:1,/* target predicted */
    in_tx:1, /* in transaction */
    abort:1, /* transaction abort */
    - reserved:60;
    + cycles:16, /* cycle count to last branch */
    + reserved:44;
    };

    #endif /* _UAPI_LINUX_PERF_EVENT_H */
    --
    1.9.3


    \
     
     \ /
      Last update: 2015-05-10 22:01    [W:3.476 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site