diff --git a/clients/drcachesim/docs/drcachesim.dox.in b/clients/drcachesim/docs/drcachesim.dox.in index 5f1a6751a6c..c90cb425b49 100644 --- a/clients/drcachesim/docs/drcachesim.dox.in +++ b/clients/drcachesim/docs/drcachesim.dox.in @@ -542,8 +542,10 @@ Total counts: 0 total icache flushes 0 total dcache flushes 3 total threads - 1134 total scheduling markers - 5 total transfer markers + 1134 total timestamp + cpuid markers + 0 total idle markers + 0 total wait markers + 5 total kernel transfer markers 10 total function id markers 0 total function return address markers 30 total function argument markers @@ -563,8 +565,10 @@ Thread 64951 counts: 12594 data stores 0 icache flushes 0 dcache flushes - 1072 scheduling markers - 5 transfer markers + 1072 timestamp + cpuid markers + 0 idle markers + 0 wait markers + 5 kernel transfer markers 4 function id markers 0 function return address markers 12 function argument markers @@ -584,8 +588,10 @@ Thread 64958 counts: 262 data stores 0 icache flushes 0 dcache flushes - 30 scheduling markers - 0 transfer markers + 30 timestamp + cupid markers + 0 idle markers + 0 wait markers + 0 kernel transfer markers 2 function id markers 0 function return address markers 6 function argument markers @@ -605,8 +611,10 @@ Thread 64959 counts: 266 data stores 0 icache flushes 0 dcache flushes - 32 scheduling markers - 0 transfer markers + 32 timestamp + cpuid markers + 0 idle markers + 0 wait markers + 0 kernel transfer markers 4 function id markers 0 function return address markers 12 function argument markers diff --git a/clients/drcachesim/tests/allasm-aarch64-flush-basic-counts.templatex b/clients/drcachesim/tests/allasm-aarch64-flush-basic-counts.templatex index 88897be9c56..50400cc7173 100644 --- a/clients/drcachesim/tests/allasm-aarch64-flush-basic-counts.templatex +++ b/clients/drcachesim/tests/allasm-aarch64-flush-basic-counts.templatex @@ -11,8 +11,10 @@ Total counts: 1 total icache flushes 3 total dcache flushes 1 total threads - .* total scheduling markers - .* total transfer markers + .* total timestamp \+ cpuid markers + .* total idle markers + .* total wait markers + .* total kernel transfer markers .* total function id markers .* total function return address markers .* total function argument markers @@ -28,8 +30,10 @@ Thread .* counts: .* data stores 1 icache flushes 3 dcache flushes - .* scheduling markers - .* transfer markers + .* timestamp \+ cpuid markers + .* idle markers + .* wait markers + .* kernel transfer markers .* function id markers .* function return address markers .* function argument markers diff --git a/clients/drcachesim/tests/allasm-aarch64-prefetch-basic-counts.templatex b/clients/drcachesim/tests/allasm-aarch64-prefetch-basic-counts.templatex index 947f268c667..34f1abae39f 100644 --- a/clients/drcachesim/tests/allasm-aarch64-prefetch-basic-counts.templatex +++ b/clients/drcachesim/tests/allasm-aarch64-prefetch-basic-counts.templatex @@ -11,7 +11,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: 96 \(fetched\) instructions @@ -22,5 +22,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/allasm-repstr-basic-counts.templatex b/clients/drcachesim/tests/allasm-repstr-basic-counts.templatex index c9d36522418..82e836da1d7 100644 --- a/clients/drcachesim/tests/allasm-repstr-basic-counts.templatex +++ b/clients/drcachesim/tests/allasm-repstr-basic-counts.templatex @@ -20,8 +20,10 @@ Total counts: 0 total icache flushes 0 total dcache flushes 1 total threads - 48 total scheduling markers - 0 total transfer markers + 48 total timestamp \+ cpuid markers + 0 total idle markers + 0 total wait markers + 0 total kernel transfer markers 0 total function id markers 0 total function return address markers 0 total function argument markers @@ -41,8 +43,10 @@ Thread [0-9]* counts: 5 data stores 0 icache flushes 0 dcache flushes - 48 scheduling markers - 0 transfer markers + 48 timestamp \+ cpuid markers + 0 idle markers + 0 wait markers + 0 kernel transfer markers 0 function id markers 0 function return address markers 0 function argument markers diff --git a/clients/drcachesim/tests/allasm-scattergather-basic-counts-aarch64.templatex b/clients/drcachesim/tests/allasm-scattergather-basic-counts-aarch64.templatex index 6dda568fada..25e6daaa7fa 100644 --- a/clients/drcachesim/tests/allasm-scattergather-basic-counts-aarch64.templatex +++ b/clients/drcachesim/tests/allasm-scattergather-basic-counts-aarch64.templatex @@ -37,7 +37,7 @@ Total counts: 0 total icache flushes 0 total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: #ifdef __ARM_FEATURE_SVE2 @@ -74,5 +74,5 @@ Thread .* counts: #endif /* __ARM_FEATURE_SVE2 */ 0 icache flushes 0 dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/allasm-scattergather-basic-counts-x86.templatex b/clients/drcachesim/tests/allasm-scattergather-basic-counts-x86.templatex index 021e9a29ec6..2e4adfeff7d 100644 --- a/clients/drcachesim/tests/allasm-scattergather-basic-counts-x86.templatex +++ b/clients/drcachesim/tests/allasm-scattergather-basic-counts-x86.templatex @@ -12,7 +12,7 @@ Total counts: 0 total icache flushes 0 total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: 96 \(fetched\) instructions @@ -23,5 +23,5 @@ Thread .* counts: 5 data stores 0 icache flushes 0 dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/basic_counts.templatex b/clients/drcachesim/tests/basic_counts.templatex index e43e37141f0..b95678599b4 100644 --- a/clients/drcachesim/tests/basic_counts.templatex +++ b/clients/drcachesim/tests/basic_counts.templatex @@ -29,11 +29,13 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers + .* total idle markers + .* total wait markers #if defined(WINDOWS) && !defined(X64) - 26 total transfer markers + 26 total kernel transfer markers #else - 13 total transfer markers + 13 total kernel transfer markers #endif .* total function id markers .* total function return address markers @@ -54,11 +56,13 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers + .* idle markers + .* wait markers #if defined(WINDOWS) && !defined(X64) - 26 transfer markers + 26 kernel transfer markers #else - 13 transfer markers + 13 kernel transfer markers #endif .* function id markers .* function return address markers diff --git a/clients/drcachesim/tests/builtin-prefetch-basic-counts.templatex b/clients/drcachesim/tests/builtin-prefetch-basic-counts.templatex index 59d70617825..feba56ca4b0 100644 --- a/clients/drcachesim/tests/builtin-prefetch-basic-counts.templatex +++ b/clients/drcachesim/tests/builtin-prefetch-basic-counts.templatex @@ -15,7 +15,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -30,5 +30,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/core_serial.templatex b/clients/drcachesim/tests/core_serial.templatex index 44591102026..370080b486c 100644 --- a/clients/drcachesim/tests/core_serial.templatex +++ b/clients/drcachesim/tests/core_serial.templatex @@ -46,8 +46,10 @@ Total counts: 0 total icache flushes 0 total dcache flushes 8 total threads - 1574 total scheduling markers - 168 total transfer markers + 1574 total timestamp \+ cpuid markers + 345686 total idle markers + 0 total wait markers + 168 total kernel transfer markers 0 total function id markers 0 total function return address markers 0 total function argument markers diff --git a/clients/drcachesim/tests/core_sharded_test.cpp b/clients/drcachesim/tests/core_sharded_test.cpp index 6446f65f834..616f413957e 100644 --- a/clients/drcachesim/tests/core_sharded_test.cpp +++ b/clients/drcachesim/tests/core_sharded_test.cpp @@ -253,6 +253,11 @@ Core .* "-replay_file", record_file.c_str() }; std::string replay_out = run_analyzer(sizeof(replay_args) / sizeof(replay_args[0]), replay_args); + // The idle and wait counts can vary so we remove them. + record_out = std::regex_replace( + record_out, std::regex(" *[0-9]+ [a-z ]*(idle|wait) markers\\n"), ""); + replay_out = std::regex_replace( + replay_out, std::regex(" *[0-9]+ [a-z ]*(idle|wait) markers\\n"), ""); assert(replay_out == record_out); } #endif diff --git a/clients/drcachesim/tests/filter-no-d.templatex b/clients/drcachesim/tests/filter-no-d.templatex index e24ed4c47d4..9da703cfd87 100644 --- a/clients/drcachesim/tests/filter-no-d.templatex +++ b/clients/drcachesim/tests/filter-no-d.templatex @@ -11,7 +11,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -22,7 +22,7 @@ Thread .* counts: 0 data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* =========================================================================== diff --git a/clients/drcachesim/tests/filter-no-i.templatex b/clients/drcachesim/tests/filter-no-i.templatex index f1f461625b4..707f3736d7a 100644 --- a/clients/drcachesim/tests/filter-no-i.templatex +++ b/clients/drcachesim/tests/filter-no-i.templatex @@ -11,7 +11,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread [1-9][0-9]* counts: 0 \(fetched\) instructions @@ -22,7 +22,7 @@ Thread [1-9][0-9]* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* =========================================================================== diff --git a/clients/drcachesim/tests/offline-L0-filter-until-instrs-2.templatex b/clients/drcachesim/tests/offline-L0-filter-until-instrs-2.templatex index d3e3eab09a6..235495c3ebc 100644 --- a/clients/drcachesim/tests/offline-L0-filter-until-instrs-2.templatex +++ b/clients/drcachesim/tests/offline-L0-filter-until-instrs-2.templatex @@ -16,7 +16,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -27,5 +27,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-L0-filter-until-instrs-exit-after.templatex b/clients/drcachesim/tests/offline-L0-filter-until-instrs-exit-after.templatex index 2d8a3ee3fae..c592dfbbf42 100644 --- a/clients/drcachesim/tests/offline-L0-filter-until-instrs-exit-after.templatex +++ b/clients/drcachesim/tests/offline-L0-filter-until-instrs-exit-after.templatex @@ -14,7 +14,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -25,5 +25,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-refs.templatex b/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-refs.templatex index e1203a73714..5b7a3abd2ec 100644 --- a/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-refs.templatex +++ b/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-refs.templatex @@ -15,7 +15,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -26,5 +26,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-trace-size.templatex b/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-trace-size.templatex index 5610f91d9bb..e474c892b69 100644 --- a/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-trace-size.templatex +++ b/clients/drcachesim/tests/offline-L0-filter-until-instrs-max-trace-size.templatex @@ -14,7 +14,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -25,5 +25,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-allasm-aarch64-flush-basic-counts.templatex b/clients/drcachesim/tests/offline-allasm-aarch64-flush-basic-counts.templatex index 69dc3f5bf6d..39d71ce8391 100644 --- a/clients/drcachesim/tests/offline-allasm-aarch64-flush-basic-counts.templatex +++ b/clients/drcachesim/tests/offline-allasm-aarch64-flush-basic-counts.templatex @@ -10,14 +10,8 @@ Total counts: 1 total icache flushes 3 total dcache flushes 1 total threads - 6 total scheduling markers - 0 total transfer markers - 0 total function id markers - 0 total function return address markers - 0 total function argument markers - 0 total function return value markers - .* total other markers - .* total encodings + 6 total timestamp \+ cpuid markers +.* Thread .* counts: 19 \(fetched\) instructions 19 unique \(fetched\) instructions @@ -27,11 +21,5 @@ Thread .* counts: 0 data stores 1 icache flushes 3 dcache flushes - 6 scheduling markers - 0 transfer markers - 0 function id markers - 0 function return address markers - 0 function argument markers - 0 function return value markers - .* other markers - .* encodings + 6 timestamp \+ cpuid markers +.* diff --git a/clients/drcachesim/tests/offline-allasm-aarch64-prefetch-counts.templatex b/clients/drcachesim/tests/offline-allasm-aarch64-prefetch-counts.templatex index ae157b5832b..7452f33eb1c 100644 --- a/clients/drcachesim/tests/offline-allasm-aarch64-prefetch-counts.templatex +++ b/clients/drcachesim/tests/offline-allasm-aarch64-prefetch-counts.templatex @@ -10,7 +10,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: 96 \(fetched\) instructions @@ -21,7 +21,7 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* Prefetch operation frequencies: 2 prefetch_read_l1 diff --git a/clients/drcachesim/tests/offline-allasm-repstr-basic-counts.templatex b/clients/drcachesim/tests/offline-allasm-repstr-basic-counts.templatex index 8eb32abdfa4..79b2495c6a0 100644 --- a/clients/drcachesim/tests/offline-allasm-repstr-basic-counts.templatex +++ b/clients/drcachesim/tests/offline-allasm-repstr-basic-counts.templatex @@ -19,8 +19,10 @@ Total counts: 0 total icache flushes 0 total dcache flushes 1 total threads - 48 total scheduling markers - 0 total transfer markers + 48 total timestamp \+ cpuid markers + 0 total idle markers + 0 total wait markers + 0 total kernel transfer markers 0 total function id markers 0 total function return address markers 0 total function argument markers @@ -40,8 +42,10 @@ Thread [0-9]* counts: 5 data stores 0 icache flushes 0 dcache flushes - 48 scheduling markers - 0 transfer markers + 48 timestamp \+ cpuid markers + 0 idle markers + 0 wait markers + 0 kernel transfer markers 0 function id markers 0 function return address markers 0 function argument markers diff --git a/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-aarch64.templatex b/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-aarch64.templatex index 23a42ecdb44..d16476d530a 100644 --- a/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-aarch64.templatex +++ b/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-aarch64.templatex @@ -36,7 +36,7 @@ Total counts: 0 total icache flushes 0 total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: #ifdef __ARM_FEATURE_SVE2 @@ -74,5 +74,5 @@ Thread .* counts: #endif /* __ARM_FEATURE_SVE2 */ 0 icache flushes 0 dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-x86.templatex b/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-x86.templatex index 2f94a3710b2..a0badcc6525 100644 --- a/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-x86.templatex +++ b/clients/drcachesim/tests/offline-allasm-scattergather-basic-counts-x86.templatex @@ -11,7 +11,7 @@ Total counts: 0 total icache flushes 0 total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: 96 \(fetched\) instructions @@ -22,5 +22,5 @@ Thread .* counts: 5 data stores 0 icache flushes 0 dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-basic_counts.templatex b/clients/drcachesim/tests/offline-basic_counts.templatex index 2b3c4c5c8b1..dbf1b7da754 100644 --- a/clients/drcachesim/tests/offline-basic_counts.templatex +++ b/clients/drcachesim/tests/offline-basic_counts.templatex @@ -28,11 +28,13 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers + .* total idle markers + .* total wait markers #if defined(WINDOWS) && !defined(X64) - 26 total transfer markers + 26 total kernel transfer markers #else - 13 total transfer markers + 13 total kernel transfer markers #endif .* total function id markers .* total function return address markers @@ -53,11 +55,13 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers + .* idle markers + .* wait markers #if defined(WINDOWS) && !defined(X64) - 26 transfer markers + 26 kernel transfer markers #else - 13 transfer markers + 13 kernel transfer markers #endif .* function id markers .* function return address markers diff --git a/clients/drcachesim/tests/offline-builtin-prefetch-basic-counts.templatex b/clients/drcachesim/tests/offline-builtin-prefetch-basic-counts.templatex index b7bc73feb70..3d7502ee26a 100644 --- a/clients/drcachesim/tests/offline-builtin-prefetch-basic-counts.templatex +++ b/clients/drcachesim/tests/offline-builtin-prefetch-basic-counts.templatex @@ -14,7 +14,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -29,5 +29,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-burst_aarch64_sys.templatex b/clients/drcachesim/tests/offline-burst_aarch64_sys.templatex index acacbfd6238..a8514659127 100644 --- a/clients/drcachesim/tests/offline-burst_aarch64_sys.templatex +++ b/clients/drcachesim/tests/offline-burst_aarch64_sys.templatex @@ -15,7 +15,7 @@ Total counts: 1 total icache flushes 4 total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -26,5 +26,5 @@ Thread .* counts: .* data stores 1 icache flushes 4 dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-burst_threadL0filter.templatex b/clients/drcachesim/tests/offline-burst_threadL0filter.templatex index c4c781ad099..f2467214702 100644 --- a/clients/drcachesim/tests/offline-burst_threadL0filter.templatex +++ b/clients/drcachesim/tests/offline-burst_threadL0filter.templatex @@ -22,6 +22,5 @@ Total counts: *[0-9]* total icache flushes *[0-9]* total dcache flushes 4 total threads - *[0-9]* total scheduling markers - *[0-9]* total transfer markers + *[0-9]* total timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-burst_threadfilter.templatex b/clients/drcachesim/tests/offline-burst_threadfilter.templatex index eb9d301734e..a21b0388075 100644 --- a/clients/drcachesim/tests/offline-burst_threadfilter.templatex +++ b/clients/drcachesim/tests/offline-burst_threadfilter.templatex @@ -22,6 +22,5 @@ Total counts: *[0-9]* total icache flushes *[0-9]* total dcache flushes [1-4] total threads - *[0-9]* total scheduling markers - *[0-9]* total transfer markers + *[0-9]* total timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-filter-no-d.templatex b/clients/drcachesim/tests/offline-filter-no-d.templatex index 265af357189..50115c3c006 100644 --- a/clients/drcachesim/tests/offline-filter-no-d.templatex +++ b/clients/drcachesim/tests/offline-filter-no-d.templatex @@ -10,7 +10,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -21,5 +21,5 @@ Thread .* counts: 0 data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-filter-no-i.templatex b/clients/drcachesim/tests/offline-filter-no-i.templatex index bb072e2c631..e8177acaf95 100644 --- a/clients/drcachesim/tests/offline-filter-no-i.templatex +++ b/clients/drcachesim/tests/offline-filter-no-i.templatex @@ -10,7 +10,7 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread [1-9][0-9]* counts: 0 \(fetched\) instructions @@ -21,5 +21,5 @@ Thread [1-9][0-9]* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-interval-instr-count-output.templatex b/clients/drcachesim/tests/offline-interval-instr-count-output.templatex index e0a1268b7c7..1af094cdae5 100644 --- a/clients/drcachesim/tests/offline-interval-instr-count-output.templatex +++ b/clients/drcachesim/tests/offline-interval-instr-count-output.templatex @@ -10,7 +10,7 @@ Total counts: [ 0-9]* total icache flushes [ 0-9]* total dcache flushes 1 total threads - [ 0-9]* total scheduling markers + [ 0-9]* total timestamp \+ cpuid markers .* Thread [0-9]* counts: [ 0-9]* \(fetched\) instructions @@ -21,7 +21,7 @@ Thread [0-9]* counts: [ 0-9]* data stores [ 0-9]* icache flushes [ 0-9]* dcache flushes - [ 0-9]* scheduling markers + [ 0-9]* timestamp \+ cpuid markers .* Printing unmerged per-shard interval results: Counts per trace interval for TID.* @@ -33,5 +33,5 @@ Interval #1 ending at timestamp [0-9]*: [ 0-9]* interval delta data stores [ 0-9]* interval delta icache flushes [ 0-9]* interval delta dcache flushes - [ 0-9]* interval delta scheduling markers + [ 0-9]* interval delta timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-interval-microseconds-count-output.templatex b/clients/drcachesim/tests/offline-interval-microseconds-count-output.templatex index bb1b946ce5d..9140aabd92b 100644 --- a/clients/drcachesim/tests/offline-interval-microseconds-count-output.templatex +++ b/clients/drcachesim/tests/offline-interval-microseconds-count-output.templatex @@ -10,7 +10,7 @@ Total counts: [ 0-9]* total icache flushes [ 0-9]* total dcache flushes 1 total threads - [ 0-9]* total scheduling markers + [ 0-9]* total timestamp \+ cpuid markers .* Thread [0-9]* counts: [ 0-9]* \(fetched\) instructions @@ -21,7 +21,7 @@ Thread [0-9]* counts: [ 0-9]* data stores [ 0-9]* icache flushes [ 0-9]* dcache flushes - [ 0-9]* scheduling markers + [ 0-9]* timestamp \+ cpuid markers .* Printing whole-trace interval results: Counts per trace interval for whole trace: @@ -33,5 +33,5 @@ Interval #1 ending at timestamp [0-9]*: [ 0-9]* interval delta data stores [ 0-9]* interval delta icache flushes [ 0-9]* interval delta dcache flushes - [ 0-9]* interval delta scheduling markers + [ 0-9]* interval delta timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-legacy-int-offs.templatex b/clients/drcachesim/tests/offline-legacy-int-offs.templatex index 76f776472bb..95775cc3508 100644 --- a/clients/drcachesim/tests/offline-legacy-int-offs.templatex +++ b/clients/drcachesim/tests/offline-legacy-int-offs.templatex @@ -12,8 +12,10 @@ Total counts: 0 total icache flushes 0 total dcache flushes 3 total threads - 136 total scheduling markers - 11 total transfer markers + 136 total timestamp \+ cpuid markers + 0 total idle markers + 0 total wait markers + 11 total kernel transfer markers 0 total function id markers 0 total function return address markers 0 total function argument markers @@ -33,8 +35,10 @@ Thread 552306 counts: 4442 data stores 0 icache flushes 0 dcache flushes - 110 scheduling markers - 11 transfer markers + 110 timestamp \+ cpuid markers + 0 idle markers + 0 wait markers + 11 kernel transfer markers 0 function id markers 0 function return address markers 0 function argument markers @@ -54,8 +58,10 @@ Thread 552323 counts: 651 data stores 0 icache flushes 0 dcache flushes - 14 scheduling markers - 0 transfer markers + 14 timestamp \+ cpuid markers + 0 idle markers + 0 wait markers + 0 kernel transfer markers 0 function id markers 0 function return address markers 0 function argument markers @@ -75,8 +81,10 @@ Thread 552324 counts: 451 data stores 0 icache flushes 0 dcache flushes - 12 scheduling markers - 0 transfer markers + 12 timestamp \+ cpuid markers + 0 idle markers + 0 wait markers + 0 kernel transfer markers 0 function id markers 0 function return address markers 0 function argument markers diff --git a/clients/drcachesim/tests/offline-sysnums.templatex b/clients/drcachesim/tests/offline-sysnums.templatex index 06277171b93..1f8caba02fd 100644 --- a/clients/drcachesim/tests/offline-sysnums.templatex +++ b/clients/drcachesim/tests/offline-sysnums.templatex @@ -10,6 +10,6 @@ Total counts: .* total icache flushes .* total dcache flushes 1 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Trace invariant checks passed diff --git a/clients/drcachesim/tests/offline-warmup-pthreads-2.templatex b/clients/drcachesim/tests/offline-warmup-pthreads-2.templatex index 47fb084d733..e5cee572207 100644 --- a/clients/drcachesim/tests/offline-warmup-pthreads-2.templatex +++ b/clients/drcachesim/tests/offline-warmup-pthreads-2.templatex @@ -16,7 +16,7 @@ Total counts: .* total icache flushes .* total dcache flushes 3 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -27,5 +27,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-warmup-pthreads-max-refs.templatex b/clients/drcachesim/tests/offline-warmup-pthreads-max-refs.templatex index d220f22ea84..870db985f3c 100644 --- a/clients/drcachesim/tests/offline-warmup-pthreads-max-refs.templatex +++ b/clients/drcachesim/tests/offline-warmup-pthreads-max-refs.templatex @@ -14,7 +14,7 @@ Total counts: .* total icache flushes .* total dcache flushes 3 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -25,5 +25,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-warmup-pthreads-max-trace-size.templatex b/clients/drcachesim/tests/offline-warmup-pthreads-max-trace-size.templatex index 48de7693b58..b9398a6f5f0 100644 --- a/clients/drcachesim/tests/offline-warmup-pthreads-max-trace-size.templatex +++ b/clients/drcachesim/tests/offline-warmup-pthreads-max-trace-size.templatex @@ -14,7 +14,7 @@ Total counts: .* total icache flushes .* total dcache flushes 3 total threads - .* total scheduling markers + .* total timestamp \+ cpuid markers .* Thread .* counts: .* \(fetched\) instructions @@ -25,5 +25,5 @@ Thread .* counts: .* data stores .* icache flushes .* dcache flushes - .* scheduling markers + .* timestamp \+ cpuid markers .* diff --git a/clients/drcachesim/tests/offline-windows-asm.templatex b/clients/drcachesim/tests/offline-windows-asm.templatex index c2b156dbef2..ca567c10a08 100644 --- a/clients/drcachesim/tests/offline-windows-asm.templatex +++ b/clients/drcachesim/tests/offline-windows-asm.templatex @@ -31,8 +31,10 @@ Total counts: 0 total icache flushes 0 total dcache flushes 1 total threads - 36 total scheduling markers - 0 total transfer markers + 36 total timestamp \+ cpuid markers + 0 total idle markers + 0 total wait markers + 0 total kernel transfer markers 0 total function id markers 0 total function return address markers 0 total function argument markers @@ -53,8 +55,10 @@ Window #0: 5 window data stores 0 window icache flushes 0 window dcache flushes - 5 window scheduling markers - 0 window transfer markers + 5 window timestamp \+ cpuid markers + 0 window idle markers + 0 window wait markers + 0 window kernel transfer markers 0 window function id markers 0 window function return address markers 0 window function argument markers @@ -74,8 +78,10 @@ Window #1: 0 window data stores 0 window icache flushes 0 window dcache flushes - 6 window scheduling markers - 0 window transfer markers + 6 window timestamp \+ cpuid markers + 0 window idle markers + 0 window wait markers + 0 window kernel transfer markers 0 window function id markers 0 window function return address markers 0 window function argument markers @@ -95,8 +101,10 @@ Window #2: 0 window data stores 0 window icache flushes 0 window dcache flushes - 6 window scheduling markers - 0 window transfer markers + 6 window timestamp \+ cpuid markers + 0 window idle markers + 0 window wait markers + 0 window kernel transfer markers 0 window function id markers 0 window function return address markers 0 window function argument markers @@ -116,8 +124,10 @@ Window #3: 0 window data stores 0 window icache flushes 0 window dcache flushes - 6 window scheduling markers - 0 window transfer markers + 6 window timestamp \+ cpuid markers + 0 window idle markers + 0 window wait markers + 0 window kernel transfer markers 0 window function id markers 0 window function return address markers 0 window function argument markers @@ -137,8 +147,10 @@ Window #4: 0 window data stores 0 window icache flushes 0 window dcache flushes - 6 window scheduling markers - 0 window transfer markers + 6 window timestamp \+ cpuid markers + 0 window idle markers + 0 window wait markers + 0 window kernel transfer markers 0 window function id markers 0 window function return address markers 0 window function argument markers @@ -158,8 +170,10 @@ Window #5: 0 window data stores 0 window icache flushes 0 window dcache flushes - 6 window scheduling markers - 0 window transfer markers + 6 window timestamp \+ cpuid markers + 0 window idle markers + 0 window wait markers + 0 window kernel transfer markers 0 window function id markers 0 window function return address markers 0 window function argument markers @@ -179,8 +193,10 @@ Window #6: 0 window data stores 0 window icache flushes 0 window dcache flushes - 1 window scheduling markers - 0 window transfer markers + 1 window timestamp \+ cpuid markers + 0 window idle markers + 0 window wait markers + 0 window kernel transfer markers 0 window function id markers 0 window function return address markers 0 window function argument markers @@ -200,8 +216,10 @@ Thread [0-9]* counts: 5 data stores 0 icache flushes 0 dcache flushes - 5 scheduling markers - 0 transfer markers + 5 timestamp \+ cpuid markers + 0 idle markers + 0 wait markers + 0 kernel transfer markers 0 function id markers 0 function return address markers 0 function argument markers diff --git a/clients/drcachesim/tools/basic_counts.cpp b/clients/drcachesim/tools/basic_counts.cpp index f7a9b8408d5..46ccb74f298 100644 --- a/clients/drcachesim/tools/basic_counts.cpp +++ b/clients/drcachesim/tools/basic_counts.cpp @@ -173,9 +173,10 @@ basic_counts_t::parallel_shard_memref(void *shard_data, const memref_t &memref) } else if (memref.marker.marker_type == TRACE_MARKER_TYPE_KERNEL_EVENT || memref.marker.marker_type == TRACE_MARKER_TYPE_KERNEL_XFER) { ++counters->xfer_markers; - } else if (memref.marker.marker_type == TRACE_MARKER_TYPE_CORE_WAIT || - memref.marker.marker_type == TRACE_MARKER_TYPE_CORE_IDLE) { - // This is a synthetic record so do not increment any counts. + } else if (memref.marker.marker_type == TRACE_MARKER_TYPE_CORE_IDLE) { + ++counters->idle_markers; + } else if (memref.marker.marker_type == TRACE_MARKER_TYPE_CORE_WAIT) { + ++counters->wait_markers; } else { if (memref.marker.marker_type == TRACE_MARKER_TYPE_WINDOW_ID && static_cast(memref.marker.marker_value) != @@ -308,9 +309,11 @@ basic_counts_t::print_counters(const counters_t &counters, const std::string &pr << " threads\n"; } std::cerr << std::setw(12) << counters.sched_markers << prefix - << " scheduling markers\n"; + << " timestamp + cpuid markers\n"; + std::cerr << std::setw(12) << counters.idle_markers << prefix << " idle markers\n"; + std::cerr << std::setw(12) << counters.wait_markers << prefix << " wait markers\n"; std::cerr << std::setw(12) << counters.xfer_markers << prefix - << " transfer markers\n"; + << " kernel transfer markers\n"; std::cerr << std::setw(12) << counters.func_id_markers << prefix << " function id markers\n"; std::cerr << std::setw(12) << counters.func_retaddr_markers << prefix diff --git a/clients/drcachesim/tools/basic_counts.h b/clients/drcachesim/tools/basic_counts.h index 8493749fd03..28a1d35ec42 100644 --- a/clients/drcachesim/tools/basic_counts.h +++ b/clients/drcachesim/tools/basic_counts.h @@ -103,6 +103,8 @@ class basic_counts_t : public analysis_tool_t { loads += rhs.loads; stores += rhs.stores; sched_markers += rhs.sched_markers; + idle_markers += rhs.idle_markers; + wait_markers += rhs.wait_markers; xfer_markers += rhs.xfer_markers; func_id_markers += rhs.func_id_markers; func_retaddr_markers += rhs.func_retaddr_markers; @@ -136,6 +138,8 @@ class basic_counts_t : public analysis_tool_t { loads -= rhs.loads; stores -= rhs.stores; sched_markers -= rhs.sched_markers; + idle_markers -= rhs.idle_markers; + wait_markers -= rhs.wait_markers; xfer_markers -= rhs.xfer_markers; func_id_markers -= rhs.func_id_markers; func_retaddr_markers -= rhs.func_retaddr_markers; @@ -170,6 +174,7 @@ class basic_counts_t : public analysis_tool_t { kernel_nofetch_instrs == rhs.kernel_nofetch_instrs && prefetches == rhs.prefetches && loads == rhs.loads && stores == rhs.stores && sched_markers == rhs.sched_markers && + idle_markers == rhs.idle_markers && wait_markers == rhs.wait_markers && xfer_markers == rhs.xfer_markers && func_id_markers == rhs.func_id_markers && func_retaddr_markers == rhs.func_retaddr_markers && @@ -194,8 +199,10 @@ class basic_counts_t : public analysis_tool_t { int64_t prefetches = 0; int64_t loads = 0; int64_t stores = 0; - int64_t sched_markers = 0; - int64_t xfer_markers = 0; + int64_t sched_markers = 0; // Timestamps and cpuids. + int64_t idle_markers = 0; + int64_t wait_markers = 0; + int64_t xfer_markers = 0; // Kernel transfers. int64_t func_id_markers = 0; int64_t func_retaddr_markers = 0; int64_t func_arg_markers = 0;