; CHECK: 1: 14
; CHECK-UNWINDER: Binary(inline-cs-noprobe.perfbin)'s Range Counter:
-; CHECK-UNWINDER: main:1 @ foo:3.2 @ bar
-; CHECK-UNWINDER: (6af, 6bb): 14
; CHECK-UNWINDER: main:1 @ foo
; CHECK-UNWINDER: (670, 6ad): 1
; CHECK-UNWINDER: (67e, 69b): 1
; CHECK-UNWINDER: (67e, 6ad): 13
; CHECK-UNWINDER: (6bd, 6c8): 14
+; CHECK-UNWINDER: main:1 @ foo:3.2 @ bar
+; CHECK-UNWINDER: (6af, 6bb): 14
+
; CHECK-UNWINDER: Binary(inline-cs-noprobe.perfbin)'s Branch Counter:
; CHECK-UNWINDER: main:1 @ foo
}
static void printSampleCounter(ContextRangeCounter &Counter) {
- for (auto Range : Counter) {
+ // Use ordered map to make the output deterministic
+ std::map<std::string, RangeSample> OrderedCounter(Counter.begin(),
+ Counter.end());
+ for (auto Range : OrderedCounter) {
outs() << Range.first << "\n";
for (auto I : Range.second) {
outs() << " (" << format("%" PRIx64, I.first.first) << ", "