[PATCH] D141446: Fix to D139603(reverted) - moved size check to unit test so that it is cross-platform

William Junda Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 13:07:33 PST 2023


huangjd updated this revision to Diff 493715.
huangjd added a comment.

Refactored to fix bugs on non linux platforms

Moved all the tests into unit test since

1. Output size limit doesn't require the preservation of specific functions if a different pruning strategy is used in the future, so CHECK-NEXT is too restrictive. In unit test each rewritten sample is checked against the original sample to confirm all its fields are identical

2. Windows use '\r\n' line ending so the behavior of output size limit in text mode is different (more functions being pruned than linux for the same limit because extra char per line). This breaks lit test

3. Write once for many tests with repetative output


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141446/new/

https://reviews.llvm.org/D141446

Files:
  llvm/include/llvm/ProfileData/SampleProfWriter.h
  llvm/lib/ProfileData/SampleProfWriter.cpp
  llvm/tools/llvm-profdata/llvm-profdata.cpp
  llvm/unittests/tools/CMakeLists.txt
  llvm/unittests/tools/llvm-profdata/CMakeLists.txt
  llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141446.493715.patch
Type: text/x-patch
Size: 25275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230131/4be36ed1/attachment-0001.bin>


More information about the llvm-commits mailing list