bcc/python: extend perf_event_attr ctype
This commit brings the Perf.perf_event_attr ctype in line with version 6
of struct perf_event_attr (see uapi/linux/perf_event.h kernel header).
Specifically:
* All named fields are added, including field names within anonymous
unions and bitfields
* Perf.perf_event_attr now complains when a field which isn't part of
the ctype struct is set.
* Goal here is to prevent users from setting a
recently-added field - which we haven't updated the ctype _fields_ to
include - and getting confused when it doesn't propagate to the
perf_event_open syscall. This bit me in #3571 and I am pretty
familiar with bcc internals so I'd like to prevent this from
confusing others down the line.
* Perf.perf_event_attr's 'flags' field is removed as it was a standin
for the bitfields. The _old_ profile.py was the only script in bcc
tools that I could find using this.
The last bullet is a breaking change. Although `tools/old/profile.py`
has been migrated to use the bitfield it was flipping using `flags`,
there could be some scripts out in the wild which break. I don't think
this is likely: this stuff hasn't been significantly touched since 2016
and I suspect if users of the python interface were writing lots of
perf_event programs we would've seen more python tools or activity here.
Regardless, there is probably a way to keep `flags` field working while
also exposing named bitfields, but I suspect it'll be ugly and wanted to
see if anyone thought it was necessary.