On Wed, 2010-11-10 at 14:01 +0100, Stephane Eranian wrote:
perf_event_attr::type, as said in the initial changelog.
+ if (type < 0) {
+ err = idr_get_new_above(&pmu_idr, pmu, PERF_TYPE_MAX, &type);
and
+ rcu_read_lock();
+ pmu = idr_find(&pmu_idr, event->attr.type);
+ rcu_read_unlock();
+ if (pmu)
+ goto unlock;
So we start dynamic IDs at the top of the static range, and only do
dynamic IDs for those that don't already have a static number.
--