Change sample profile writer to make it deterministic.
authorDehao Chen <dehao@google.com>
Thu, 11 May 2017 23:43:44 +0000 (23:43 +0000)
committerDehao Chen <dehao@google.com>
Thu, 11 May 2017 23:43:44 +0000 (23:43 +0000)
commit8d1c983f451f9256062bd92ba8358723c7254216
tree47abd16d7e1b76bef829fd7f10c25c69ba7c1260
parent0f01fb39e3fe3d8e99df1dd185e75ad584b777b3
Change sample profile writer to make it deterministic.

Summary: This patch changes the function profile output order to be deterministic. In order to make it easier to understand, hottest functions (with most total samples) is ordered first.

Reviewers: dnovillo, davidxl

Reviewed By: dnovillo

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33111

llvm-svn: 302851
llvm/include/llvm/ProfileData/SampleProfWriter.h
llvm/lib/ProfileData/SampleProfWriter.cpp
llvm/test/tools/llvm-profdata/sample-profile-basic.test