| 108 | } // namespace |
| 109 | |
| 110 | MaliCounter::MaliCounter(ScaleFactor scale_factor) |
| 111 | { |
| 112 | _counters = { |
| 113 | {"GPU_ACTIVE", Measurement(0, "cycles")}, |
| 114 | }; |
| 115 | |
| 116 | _core_counters = { |
| 117 | {"ARITH_WORDS", {"Arithmetic pipe", std::map<int, uint64_t>(), "instructions"}}, |
| 118 | {"LS_ISSUE", {"LS pipe", std::map<int, uint64_t>(), "instructions"}}, |
| 119 | {"TEX_ISSUE", {"Texture pipe", std::map<int, uint64_t>(), "instructions"}}, |
| 120 | {"COMPUTE_ACTIVE", {"Compute core", std::map<int, uint64_t>(), "cycles"}}, |
| 121 | {"FRAG_ACTIVE", {"Fragment core", std::map<int, uint64_t>(), "cycles"}}, |
| 122 | }; |
| 123 | |
| 124 | switch (scale_factor) |
| 125 | { |
| 126 | case ScaleFactor::NONE: |
| 127 | _scale_factor = 1; |
| 128 | _unit = ""; |
| 129 | break; |
| 130 | case ScaleFactor::SCALE_1K: |
| 131 | _scale_factor = 1000; |
| 132 | _unit = "K "; |
| 133 | break; |
| 134 | case ScaleFactor::SCALE_1M: |
| 135 | _scale_factor = 1000000; |
| 136 | _unit = "M "; |
| 137 | break; |
| 138 | default: |
| 139 | ARM_COMPUTE_ERROR("Invalid scale"); |
| 140 | } |
| 141 | |
| 142 | init(); |
| 143 | } |
| 144 | |
| 145 | MaliCounter::~MaliCounter() |
| 146 | { |
nothing calls this directly
no test coverage detected