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