[PATCH] D16727: [Profiling] Write out sparse indexed profiles

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 10:00:15 PST 2016


vsk marked 3 inline comments as done.
vsk added a comment.

I think we should keep the non-sparse mode. Users of llvm-profdata might rely on having records for functions which don't execute (though I imagine this is a small group). In addition, one of our tests assumes this (weight-instr.test). Having -sparse turned on by default seems fair to me.


================
Comment at: unittests/ProfileData/CoverageMappingTest.cpp:291
@@ -282,1 +290,3 @@
+TEST_P(MaybeSparseCoverageMappingTest, strip_filename_prefix) {
+  InstrProfRecord Record("file1:func", 0x1234, {0});
   ProfileWriter.addRecord(std::move(Record));
----------------
davidxl wrote:
> what is this change about?
IIUC, changing the counter from 10 to 0 doesn't alter the spirit of this test.

The change lets us check that we behave correctly when we don't write `Record` out.


http://reviews.llvm.org/D16727





More information about the llvm-commits mailing list