|
@@ -5729,9 +5729,6 @@ static void perf_output_read_one(struct perf_output_handle *handle,
|
|
|
__output_copy(handle, values, n * sizeof(u64));
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * XXX PERF_FORMAT_GROUP vs inherited events seems difficult.
|
|
|
- */
|
|
|
static void perf_output_read_group(struct perf_output_handle *handle,
|
|
|
struct perf_event *event,
|
|
|
u64 enabled, u64 running)
|
|
@@ -5776,6 +5773,13 @@ static void perf_output_read_group(struct perf_output_handle *handle,
|
|
|
#define PERF_FORMAT_TOTAL_TIMES (PERF_FORMAT_TOTAL_TIME_ENABLED|\
|
|
|
PERF_FORMAT_TOTAL_TIME_RUNNING)
|
|
|
|
|
|
+/*
|
|
|
+ * XXX PERF_SAMPLE_READ vs inherited events seems difficult.
|
|
|
+ *
|
|
|
+ * The problem is that its both hard and excessively expensive to iterate the
|
|
|
+ * child list, not to mention that its impossible to IPI the children running
|
|
|
+ * on another CPU, from interrupt/NMI context.
|
|
|
+ */
|
|
|
static void perf_output_read(struct perf_output_handle *handle,
|
|
|
struct perf_event *event)
|
|
|
{
|
|
@@ -9462,9 +9466,10 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
|
|
|
local64_set(&hwc->period_left, hwc->sample_period);
|
|
|
|
|
|
/*
|
|
|
- * we currently do not support PERF_FORMAT_GROUP on inherited events
|
|
|
+ * We currently do not support PERF_SAMPLE_READ on inherited events.
|
|
|
+ * See perf_output_read().
|
|
|
*/
|
|
|
- if (attr->inherit && (attr->read_format & PERF_FORMAT_GROUP))
|
|
|
+ if (attr->inherit && (attr->sample_type & PERF_SAMPLE_READ))
|
|
|
goto err_ns;
|
|
|
|
|
|
if (!has_branch_stack(event))
|