This field was introduced by linux kernel commit v4.12-rc1~152^2~42^2~10.
* configure.ac (AC_CHECK_MEMBERS): Add perf_event_attr.namespaces.
* perf_event_struct.h (struct perf_event_attr): Add namespaces field.
* perf.c (print_perf_event_attr): Print namespaces field.
Update comment for __reserved_1 field.
* tests/perf_event_open.c (struct pea_flags): Add namespaces field.
(print_event_attr): Update expected output.
struct perf_event_attr.use_clockid,
struct perf_event_attr.context_switch,
struct perf_event_attr.write_backward,
+ struct perf_event_attr.namespaces,
struct perf_event_attr.bp_type,
struct perf_event_attr.config1,
struct perf_event_attr.config2,
", comm_exec=%u"
", use_clockid=%u"
", context_switch=%u"
- ", write_backward=%u",
+ ", write_backward=%u"
+ ", namespaces=%u",
attr->mmap_data,
attr->sample_id_all,
attr->exclude_host,
attr->comm_exec,
attr->use_clockid,
attr->context_switch,
- attr->write_backward);
+ attr->write_backward,
+ attr->namespaces);
/*
* Print it only in case it is non-zero, since it may contain flags we
if (attr->__reserved_1) {
tprintf(", __reserved_1=%#" PRIx64,
(uint64_t) attr->__reserved_1);
- tprints_comment("Bits 63..28");
+ tprints_comment("Bits 63..29");
}
if (attr->watermark)
use_clockid :1,
context_switch :1,
write_backward :1,
- __reserved_1 :36;
+ namespaces :1,
+ __reserved_1 :35;
union {
uint32_t wakeup_events;
uint32_t wakeup_watermark;
use_clockid :1,
context_switch :1,
write_backward :1,
- __reserved_1 :36;
+ namespaces :1,
+ __reserved_1 :35;
};
static const char *
# endif
printf(", write_backward=%" PRIu64, val);
+ val =
+# ifdef HAVE_STRUCT_PERF_EVENT_ATTR_NAMESPACES
+ attr->namespaces;
+# else
+ flags_data.flags.namespaces;
+# endif
+ printf(", namespaces=%" PRIu64, val);
+
val = flags_data.flags.__reserved_1;
if (val)
- printf(", __reserved_1=%#" PRIx64 " /* Bits 63..28 */", val);
+ printf(", __reserved_1=%#" PRIx64 " /* Bits 63..29 */", val);
printf(", %s=%u",
attr->watermark ? "wakeup_watermark" : "wakeup_events",