| 386 | } |
| 387 | |
| 388 | void MaliCounter::stop() |
| 389 | { |
| 390 | sample_counters(); |
| 391 | wait_next_event(); |
| 392 | |
| 393 | const uint32_t *counter = get_counters(mali_userspace::MALI_NAME_BLOCK_JM); |
| 394 | _counters.at("GPU_ACTIVE") = |
| 395 | Measurement(counter[find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_JM, "GPU_ACTIVE")], |
| 396 | _counters.at("GPU_ACTIVE").unit()); |
| 397 | |
| 398 | const int arith_index = find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_SHADER, "ARITH_WORDS"); |
| 399 | const int ls_index = find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_SHADER, "LS_ISSUE"); |
| 400 | const int tex_index = find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_SHADER, "TEX_ISSUE"); |
| 401 | const int compute_index = find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_SHADER, "COMPUTE_ACTIVE"); |
| 402 | const int frag_index = find_counter_index_by_name(mali_userspace::MALI_NAME_BLOCK_SHADER, "FRAG_ACTIVE"); |
| 403 | |
| 404 | // Shader core counters can be averaged if desired, but here we don't. |
| 405 | for (uint32_t core = 0; core < _num_cores; ++core) |
| 406 | { |
| 407 | const uint32_t *sc_counter = get_counters(mali_userspace::MALI_NAME_BLOCK_SHADER, core); |
| 408 | |
| 409 | _core_counters.at("ARITH_WORDS").values[core] = sc_counter[arith_index]; |
| 410 | _core_counters.at("LS_ISSUE").values[core] = sc_counter[ls_index]; |
| 411 | _core_counters.at("TEX_ISSUE").values[core] = sc_counter[tex_index]; |
| 412 | _core_counters.at("COMPUTE_ACTIVE").values[core] = sc_counter[compute_index]; |
| 413 | _core_counters.at("FRAG_ACTIVE").values[core] = sc_counter[frag_index]; |
| 414 | } |
| 415 | |
| 416 | _stop_time = _timestamp; |
| 417 | } |
| 418 | |
| 419 | std::string MaliCounter::id() const |
| 420 | { |
nothing calls this directly
no test coverage detected