[Mesa-dev] AMD_performance_monitor redux!

Kenneth Graunke kenneth at whitecape.org
Thu Sep 19 16:27:41 PDT 2013


Hello,

After a long hiatus, here are updated AMD_performance_monitor patches.

I've reworked the core data structures significantly.  Counter lists
are now stored in the group objects, rather than as a single global list,
which means counter IDs don't need to be globally unique.  Also, instead
of explicitly specifying them, group IDs and counter IDs are now always
their array index.  (In the previous version, I had a lot of bugs where
I would sometimes use the array index, and sometimes the counter ID;
making them the same clarifies things a lot.)

I think these should (finally) resolve most of the issues Christoph 
pointed out with my last patches.  Thanks Christoph!  Sorry for dropping
the ball on this series for so many months.

Tracking which groups are active is easy: ActiveGroups[group_index] != 0
means the group has counters active.  (Actually, == n means that n
counters from that group are active.)

Tracking which counters are active within a group is also fairly simple:
BITSET_TEST(ActiveGroups[group_index], counter_index)

These live on the 'amdperf' branch of ~kwg/mesa.  That branch also has
some rough support for Sandybridge, which demonstrates that it's not
too hard to support multiple generations of hardware which offer different
sets of counters.

--Ken



More information about the mesa-dev mailing list