[Mesa-dev] [PATCH 2/7] nvc0: add missing HW SM perf counters for SM30 (Kepler)

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed Dec 2 14:49:46 PST 2015


SM30 is the compute capability version for GK104/GK106/GK107.
This also introduces a new signal group selection called UNK0F.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c | 6 ++++++
 src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.h | 3 +++
 src/gallium/drivers/nouveau/nvc0/nve4_compute.xml.h | 1 +
 3 files changed, 10 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c
index 7f63d38..5ece98b 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.c
@@ -38,6 +38,7 @@ static const char *nve4_hw_sm_query_names[] =
    /* MP counters */
    "active_cycles",
    "active_warps",
+   "atom_cas_count",
    "atom_count",
    "branch",
    "divergent_branch",
@@ -53,6 +54,8 @@ static const char *nve4_hw_sm_query_names[] =
    "inst_issued2",
    "l1_global_load_hit",
    "l1_global_load_miss",
+   "__l1_global_load_transactions",
+   "__l1_global_store_transactions",
    "l1_local_load_hit",
    "l1_local_load_miss",
    "l1_local_store_hit",
@@ -231,6 +234,7 @@ static const struct nvc0_hw_sm_query_cfg nve4_hw_sm_queries[] =
 {
    _Q1B(ACTIVE_CYCLES, 0x0001, B6, WARP, 0x00000000, 1, 1),
    _Q1B(ACTIVE_WARPS,  0x003f, B6, WARP, 0x31483104, 2, 1),
+   _Q1A(ATOM_CAS_COUNT, 0x0001, B6, BRANCH, 0x000000004, 1, 1),
    _Q1A(ATOM_COUNT, 0x0001, B6, BRANCH, 0x00000000, 1, 1),
    _Q1A(BRANCH,           0x0001, B6, BRANCH, 0x0000000c, 1, 1),
    _Q1A(DIVERGENT_BRANCH, 0x0001, B6, BRANCH, 0x00000010, 1, 1),
@@ -246,6 +250,8 @@ static const struct nvc0_hw_sm_query_cfg nve4_hw_sm_queries[] =
    _Q1A(INST_ISSUED2,  0x0001, B6, ISSUE, 0x00000008, 1, 1),
    _Q1B(L1_GLD_HIT,  0x0001, B6, L1, 0x00000010, 1, 1),
    _Q1B(L1_GLD_MISS, 0x0001, B6, L1, 0x00000014, 1, 1),
+   _Q1B(L1_GLD_TRANSACTIONS,  0x0001, B6, UNK0F, 0x00000000, 1, 1),
+   _Q1B(L1_GST_TRANSACTIONS,  0x0001, B6, UNK0F, 0x00000004, 1, 1),
    _Q1B(L1_LOCAL_LD_HIT,   0x0001, B6, L1, 0x00000000, 1, 1),
    _Q1B(L1_LOCAL_LD_MISS,  0x0001, B6, L1, 0x00000004, 1, 1),
    _Q1B(L1_LOCAL_ST_HIT,  0x0001, B6, L1, 0x00000008, 1, 1),
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.h b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.h
index 26bde0c..694d74c 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.h
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_sm.h
@@ -23,6 +23,7 @@ enum nve4_hw_sm_queries
 {
    NVE4_HW_SM_QUERY_ACTIVE_CYCLES = 0,
    NVE4_HW_SM_QUERY_ACTIVE_WARPS,
+   NVE4_HW_SM_QUERY_ATOM_CAS_COUNT,
    NVE4_HW_SM_QUERY_ATOM_COUNT,
    NVE4_HW_SM_QUERY_BRANCH,
    NVE4_HW_SM_QUERY_DIVERGENT_BRANCH,
@@ -38,6 +39,8 @@ enum nve4_hw_sm_queries
    NVE4_HW_SM_QUERY_INST_ISSUED2,
    NVE4_HW_SM_QUERY_L1_GLD_HIT,
    NVE4_HW_SM_QUERY_L1_GLD_MISS,
+   NVE4_HW_SM_QUERY_L1_GLD_TRANSACTIONS,
+   NVE4_HW_SM_QUERY_L1_GST_TRANSACTIONS,
    NVE4_HW_SM_QUERY_L1_LOCAL_LD_HIT,
    NVE4_HW_SM_QUERY_L1_LOCAL_LD_MISS,
    NVE4_HW_SM_QUERY_L1_LOCAL_ST_HIT,
diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.xml.h b/src/gallium/drivers/nouveau/nvc0/nve4_compute.xml.h
index 41e0cc2..3fff112 100644
--- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.xml.h
+++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.xml.h
@@ -304,6 +304,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NVE4_COMPUTE_MP_PM_B_SIGSEL_WARP			0x00000002
 #define NVE4_COMPUTE_MP_PM_B_SIGSEL_REPLAY			0x00000008
 #define NVE4_COMPUTE_MP_PM_B_SIGSEL_TRANSACTION		0x0000000e
+#define NVE4_COMPUTE_MP_PM_B_SIGSEL_UNK0F          0x0000000f
 #define NVE4_COMPUTE_MP_PM_B_SIGSEL_L1				0x00000010
 #define NVE4_COMPUTE_MP_PM_B_SIGSEL_MEM			0x00000011
 
-- 
2.6.2



More information about the mesa-dev mailing list