Examples/Support/Settings.cpp
/**
 * @brief Performance Counters: Enable the counters we are interested in
 */
@brief Performance Counters: Enable the counters we are interested in
@brief Performance Counters : Enable the counters we are interested in
void Settings::startPerfCounters() {
#ifdef QPU_MODE
  if (!show_perf_counters) return;
  using PC = V3DLib::vc4::PerformanceCounters;
  if (Platform::has_vc4()) {
    PC::enable({
      PC::QPU_INSTRUCTIONS,
      PC::QPU_STALLED_TMU,
      PC::L2C_CACHE_HITS,
      PC::L2C_CACHE_MISSES,
      PC::QPU_INSTRUCTION_CACHE_HITS,
      PC::QPU_INSTRUCTION_CACHE_MISSES,
      PC::QPU_CACHE_HITS,
      PC::QPU_CACHE_MISSES,
      PC::QPU_IDLE,
    });
  } else {
    using PC3 = V3DLib::v3d::PerformanceCounters;
    PC3::enter({
      PC::QPU_INSTRUCTIONS,
      PC::QPU_STALLED_TMU,
      PC::L2C_CACHE_HITS,
      PC::L2C_CACHE_MISSES,
      PC::QPU_INSTRUCTION_CACHE_HITS,
      PC::QPU_INSTRUCTION_CACHE_MISSES,
      PC::QPU_CACHE_HITS,
      PC::QPU_CACHE_MISSES,
      PC::QPU_IDLE,
      PC3::CORE_PCTR_CYCLE_COUNT,  
    });
  }
#endif
}
void Settings :: startPerfCounters ( ) { #ifdef QPU_MODE if ( ! show_perf_counters ) return ; using PC = V3DLib :: vc4 :: PerformanceCounters ; if ( Platform :: has_vc4 ( ) ) { PC :: enable ( { PC :: QPU_INSTRUCTIONS , PC :: QPU_STALLED_TMU , PC :: L2C_CACHE_HITS , PC :: L2C_CACHE_MISSES , PC :: QPU_INSTRUCTION_CACHE_HITS , PC :: QPU_INSTRUCTION_CACHE_MISSES , PC :: QPU_CACHE_HITS , PC :: QPU_CACHE_MISSES , PC :: QPU_IDLE , } ) ; } else { using PC3 = V3DLib :: v3d :: PerformanceCounters ; PC3 :: enter ( { PC :: QPU_INSTRUCTIONS , PC :: QPU_STALLED_TMU , PC :: L2C_CACHE_HITS , PC :: L2C_CACHE_MISSES , PC :: QPU_INSTRUCTION_CACHE_HITS , PC :: QPU_INSTRUCTION_CACHE_MISSES , PC :: QPU_CACHE_HITS , PC :: QPU_CACHE_MISSES , PC :: QPU_IDLE , PC3 :: CORE_PCTR_CYCLE_COUNT , } ) ; } #endif }
@brief Performance Counters: Enable the counters we are interested in
@brief Performance Counters : Enable the counters we are interested in
//printf("Entered Settings::startPerfCounters()\n"); // vc4 counters, check if same and working. // They work, but overlap is hard to detect with vc4. // specific for v3d // CHECKED for <= 40