Re: [PATCH v2 03/14] perf: Add persistent event facilities

From: Robert Richter
Date: Fri Jun 14 2013 - 03:20:44 EST

On 14.06.13 11:15:13, Namhyung Kim wrote:
> > +int perf_get_persistent_event_fd(unsigned cpu, struct perf_event_attr *attr)
> > +{
> > + struct pers_event_desc *desc;
> > +
> > + if (cpu >= (unsigned)nr_cpu_ids)
> > + return -EINVAL;
> > +
> > + list_for_each_entry(desc, &per_cpu(pers_events, cpu), plist)
> > + if (desc->attr->config == attr->config)
> > + return __alloc_persistent_event_fd(desc);
> > +
> So it only supports tracepoint events. Don't we need to add other types
> of event?

We have choosen tracepoints as initial implementation since they are
our first use case and its specifiers are unique already.

So this is for the initial implementation only. We can easily
implement support for other event types later. The only thing we need
to implement for this are unique identifiers for each persistent
event. Since all events are described in sysfs this change can be done
later without changing ABI or breaking userland.

The support for all event types is definitely on our list. We need
this also for a later implemention of registering all system wide
events as persistent events. This allows sharing events between
processes and is one of Ingos use cases to enable persistent events at

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at