diff --git a/src/testlib/qbenchmarkmetric.cpp b/src/testlib/qbenchmarkmetric.cpp index 0a9072907f..0ba55dbeb7 100644 --- a/src/testlib/qbenchmarkmetric.cpp +++ b/src/testlib/qbenchmarkmetric.cpp @@ -56,6 +56,7 @@ \value CPUTicks CPU time \value CPUMigrations Process migrations between CPUs \value CPUCycles CPU cycles + \value RefCPUCycles Reference CPU cycles \value BusCycles Bus cycles \value StalledCycles Cycles stalled \value InstructionReads Instruction reads @@ -108,6 +109,8 @@ const char * QTest::benchmarkMetricName(QBenchmarkMetric metric) return "CPUMigrations"; case CPUCycles: return "CPUCycles"; + case RefCPUCycles: + return "RefCPUCycles"; case BusCycles: return "BusCycles"; case StalledCycles: @@ -180,6 +183,8 @@ const char * QTest::benchmarkMetricUnit(QBenchmarkMetric metric) return "CPU migrations"; case CPUCycles: return "CPU cycles"; + case RefCPUCycles: + return "Reference CPU cycles"; case BusCycles: return "bus cycles"; case StalledCycles: diff --git a/src/testlib/qbenchmarkmetric.h b/src/testlib/qbenchmarkmetric.h index 44bf14b9b6..6e423473b1 100644 --- a/src/testlib/qbenchmarkmetric.h +++ b/src/testlib/qbenchmarkmetric.h @@ -78,7 +78,8 @@ enum QBenchmarkMetric { MinorPageFaults, MajorPageFaults, AlignmentFaults, - EmulationFaults + EmulationFaults, + RefCPUCycles, }; } diff --git a/src/testlib/qbenchmarkperfevents.cpp b/src/testlib/qbenchmarkperfevents.cpp index 587d3e0124..d6db40ce52 100644 --- a/src/testlib/qbenchmarkperfevents.cpp +++ b/src/testlib/qbenchmarkperfevents.cpp @@ -153,6 +153,7 @@ bool QBenchmarkPerfEventsMeasurer::isAvailable() Event type Event counter Unit Name and aliases HARDWARE CPU_CYCLES CPUCycles cycles cpu-cycles + HARDWARE REF_CPU_CYCLES RefCPUCycles ref-cycles HARDWARE INSTRUCTIONS Instructions instructions HARDWARE CACHE_REFERENCES CacheReferences cache-references HARDWARE CACHE_MISSES CacheMisses cache-misses @@ -321,6 +322,7 @@ static const char eventlist_strings[] = "migrations\0" "minor-faults\0" "page-faults\0" + "ref-cycles\0" "stalled-cycles-backend\0" "stalled-cycles-frontend\0" "task-clock\0" @@ -407,9 +409,10 @@ static const Events eventlist[] = { { 1256, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_MIGRATIONS, QTest::CPUMigrations }, { 1267, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS_MIN, QTest::MinorPageFaults }, { 1280, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_PAGE_FAULTS, QTest::PageFaults }, - { 1292, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_BACKEND, QTest::StalledCycles }, - { 1315, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND, QTest::StalledCycles }, - { 1339, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_TASK_CLOCK, QTest::WalltimeMilliseconds }, + { 1292, PERF_TYPE_HARDWARE, PERF_COUNT_HW_REF_CPU_CYCLES, QTest::RefCPUCycles }, + { 1303, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_BACKEND, QTest::StalledCycles }, + { 1326, PERF_TYPE_HARDWARE, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND, QTest::StalledCycles }, + { 1350, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_TASK_CLOCK, QTest::WalltimeMilliseconds }, { 0, PERF_TYPE_MAX, 0, QTest::Events } }; /* -- END GENERATED CODE -- */