lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 01/13] perf/core: add union to struct perf_branch_entry
On Thu, Sep 09, 2021 at 12:56:48AM -0700, Stephane Eranian wrote:
> diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
> index f92880a15645..eb11f383f4be 100644
> --- a/include/uapi/linux/perf_event.h
> +++ b/include/uapi/linux/perf_event.h
> @@ -1329,13 +1329,18 @@ union perf_mem_data_src {
> struct perf_branch_entry {
> __u64 from;
> __u64 to;
> - __u64 mispred:1, /* target mispredicted */
> - predicted:1,/* target predicted */
> - in_tx:1, /* in transaction */
> - abort:1, /* transaction abort */
> - cycles:16, /* cycle count to last branch */
> - type:4, /* branch type */
> - reserved:40;
> + union {
> + __u64 val; /* to make it easier to clear all fields */
> + struct {
> + __u64 mispred:1, /* target mispredicted */
> + predicted:1,/* target predicted */
> + in_tx:1, /* in transaction */
> + abort:1, /* transaction abort */
> + cycles:16, /* cycle count to last branch */
> + type:4, /* branch type */
> + reserved:40;
> + };
> + };
> };


Hurpmh... all other bitfields have ENDIAN_BITFIELD things except this
one. Power folks, could you please have a look?

\
 
 \ /
  Last update: 2021-09-09 21:04    [W:0.261 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site