Re: [PATCH v5 09/18] perf: disable PERF_SAMPLE_BRANCH_* when notsupported

From: Peter Zijlstra
Date: Mon Feb 06 2012 - 14:23:49 EST


On Thu, 2012-02-02 at 13:54 +0100, Stephane Eranian wrote:
> @@ -539,6 +539,10 @@ static int armpmu_event_init(struct perf_event *event)
> int err = 0;
> atomic_t *active_events = &armpmu->active_events;
>
> + /* does not support taken branch sampling */
> + if (has_branch_smpl(event))
> + return -EOPNOTSUPP;
> +
> if (armpmu->map_event(event) == -ENOENT)

I'll make that has_branch_stack(), ok? :-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/