On 09/13/2015 08:53 AM, Mathieu Desnoyers wrote: > CCing the new lttng-tools maintainer, Jérémie. More below, > > ----- On Sep 10, 2015, at 3:21 PM, Tony Jones to...@suse.com wrote: > >> Query the perf api to determine the list of events that are actually >> supported by the PMU. Reject events that are not supported. On an >> AMD Opteron 6128 the following currently listed events are not supported: >> >> perf:bus-cycles, perf:L1-dcache-store-misses, >> perf:L1-icache-stores, perf:L1-icache-store-misses, >> perf:L1-icache-prefetch-misses, perf:LLC-store-misses, >> perf:LLC-prefetches, perf:LLC-prefetch-misses, perf:dTLB-stores, >> perf:dTLB-store-misses, perf:dTLB-prefetches, >> perf:dTLB-prefetch-misses >> >> It's not clear to me (hence the RFC) why parts of the perf ABI definitions >> had been replicated into add_context.c rather than just including >> perf_event.h (other than to avoid an autotools dependancy/check on >> perf_event.h which this patch still needs). It is also possible that >> querying the available events would be better handled over the lttng >> user->kernel ABI. >> >> Thoughts? > > It might make sense to add a dependency on perf_event.h. > > I'm wondering if your detection technique below really try to > allocate a PMU counter for a short period of time ? This could > be an issue since there is a limited amount of counters available.
It's pretty much the way 'perf list' works but I hear what you are saying. Since it's possible to incrementally add events I expect the detection could fail to allocate any thus reporting no available events. I'd not considered this, I'll have to test the hypothesis. _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev