[llvm-profgen][NFC] Fix test failure by making unwinder's output deterministic
authorwlei <wlei@fb.com>
Tue, 8 Dec 2020 06:01:17 +0000 (22:01 -0800)
committerwlei <wlei@fb.com>
Tue, 8 Dec 2020 06:36:25 +0000 (22:36 -0800)
commiteea67baf8706d82268d26e908cf5415c5af114ff
tree8eb8f64cc77055b6722486cada8c87597d13c530
parent5e85a2ba1645c3edbf26bba096631fbd318ada47
[llvm-profgen][NFC] Fix test failure by making unwinder's output deterministic

Don't know why under Sanitizer build(asan/msan/ubsan), the `std::unordered_map<string, ...>`'s output order is reversed, make the regression test failed.

This change creates a workaround by using sorted container to make the output deterministic.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D92816
llvm/test/tools/llvm-profgen/inline-cs-noprobe.test
llvm/tools/llvm-profgen/PerfReader.cpp