1 #ifndef __NVC0_QUERY_HW_METRIC_H__ 2 #define __NVC0_QUERY_HW_METRIC_H__ 3 4 #include "nvc0_query_hw.h" 5 6 struct nvc0_hw_metric_query { 7 struct nvc0_hw_query base; 8 struct nvc0_hw_query *queries[8]; 9 unsigned num_queries; 10 }; 11 12 static inline struct nvc0_hw_metric_query * 13 nvc0_hw_metric_query(struct nvc0_hw_query *hq) 14 { 15 return (struct nvc0_hw_metric_query *)hq; 16 } 17 18 /* 19 * Driver metrics queries: 20 */ 21 #define NVC0_HW_METRIC_QUERY(i) (PIPE_QUERY_DRIVER_SPECIFIC + 2048 + (i)) 22 #define NVC0_HW_METRIC_QUERY_LAST NVC0_HW_METRIC_QUERY(NVC0_HW_METRIC_QUERY_COUNT - 1) 23 enum nvc0_hw_metric_queries 24 { 25 NVC0_HW_METRIC_QUERY_ACHIEVED_OCCUPANCY = 0, 26 NVC0_HW_METRIC_QUERY_BRANCH_EFFICIENCY, 27 NVC0_HW_METRIC_QUERY_INST_ISSUED, 28 NVC0_HW_METRIC_QUERY_INST_PER_WRAP, 29 NVC0_HW_METRIC_QUERY_INST_REPLAY_OVERHEAD, 30 NVC0_HW_METRIC_QUERY_ISSUED_IPC, 31 NVC0_HW_METRIC_QUERY_ISSUE_SLOTS, 32 NVC0_HW_METRIC_QUERY_ISSUE_SLOT_UTILIZATION, 33 NVC0_HW_METRIC_QUERY_IPC, 34 NVC0_HW_METRIC_QUERY_SHARED_REPLAY_OVERHEAD, 35 NVC0_HW_METRIC_QUERY_WARP_EXECUTION_EFFICIENCY, 36 NVC0_HW_METRIC_QUERY_WARP_NONPRED_EXECUTION_EFFICIENCY, 37 NVC0_HW_METRIC_QUERY_COUNT 38 }; 39 40 struct nvc0_hw_query * 41 nvc0_hw_metric_create_query(struct nvc0_context *, unsigned); 42 int 43 nvc0_hw_metric_get_driver_query_info(struct nvc0_screen *, unsigned, 44 struct pipe_driver_query_info *); 45 unsigned 46 nvc0_hw_metric_get_num_queries(struct nvc0_screen *); 47 48 #endif 49