llvm-project/compiler-rt/test/profile
Reid Kleckner 987d331fab [InstrProf] Implement static profdata registration
Summary:
The motivating use case is eliminating duplicate profile data registered
for the same inline function in two object files. Before this change,
users would observe multiple symbol definition errors with VC link, but
links with LLD would succeed.

Users (Mozilla) have reported that PGO works well with clang-cl and LLD,
but when using LLD without this static registration, we would get into a
"relocation against a discarded section" situation. I'm not sure what
happens in that situation, but I suspect that duplicate, unused profile
information was retained. If so, this change will reduce the size of
such binaries with LLD.

Now, Windows uses static registration and is in line with all the other
platforms.

Reviewers: davidxl, wmi, inglorion, void, calixte

Subscribers: mgorny, krytarowski, eraman, fedor.sergeev, hiraditya, #sanitizers, dmajor, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 353547
2019-02-08 19:03:50 +00:00
..
Inputs [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
Linux [profile] Move newly added test to the supported platform 2018-04-02 21:24:07 +00:00
Posix [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
CMakeLists.txt [sanitizer] Add macOS minimum deployment target to all compiler invocations in lit tests 2016-11-29 19:25:53 +00:00
coverage-inline.cpp [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
gcc-flag-compatibility.test [Profile] More test clean up to read profile from directory specified by -fprofile-generate= 2016-07-21 02:14:55 +00:00
infinite_loop.c [PGO] Test case changes for D41059 2017-12-18 17:56:42 +00:00
instrprof-basic.c [Profile] Add new test 2016-07-22 23:38:58 +00:00
instrprof-bufferio.c [profile] Eliminate dynamic memory allocation for buffered writer 2016-05-13 18:26:26 +00:00
instrprof-darwin-dead-strip.c [profile] Test the exported symbol set for empty programs 2018-02-28 19:00:16 +00:00
instrprof-darwin-exports.c [gcov/Darwin] Ensure external symbols are exported when using an export list 2018-12-03 20:53:58 +00:00
instrprof-dump.c [Profile] Implement new API __llvm_profile_dump 2016-08-09 04:21:14 +00:00
instrprof-error.c [profile] PROF_ERR, PROF_WARN 2016-05-20 05:15:42 +00:00
instrprof-gcov-__gcov_flush-multiple.test [GCOV] Close file mapping handle on Windows, so flushed gcda files can be removed while the process is in execution 2018-11-07 09:38:26 +00:00
instrprof-gcov-__gcov_flush-terminate.test Add a test with __gcov_flush called before terminating the program. 2018-07-16 09:13:46 +00:00
instrprof-gcov-exceptions.test [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-gcov-multiple-bbs-single-line.test [profile] Fix tests in compiler-rt for patch in gcov (https://reviews.llvm.org/D49659) 2018-09-20 16:21:09 +00:00
instrprof-gcov-one-line-function.test [GCOV] Add a test for function defined on one line (follow-up of https://reviews.llvm.org/D53600) 2018-10-30 18:41:41 +00:00
instrprof-gcov-switch.test [gcov] Add tests using switch, one with break clauses and one with fallthrough 2018-07-31 23:26:50 +00:00
instrprof-gcov-two-objects.test [Profile] Fix gcov tests 2018-09-25 11:12:15 +00:00
instrprof-get-filename.c [profile] Add interface to get profile filename 2018-07-19 19:03:50 +00:00
instrprof-hostname.c fix a test bug when executed remotedly 2016-06-24 17:42:51 +00:00
instrprof-icall-promo.test [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-merge-match.test [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-merge.c [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-merging.cpp [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-override-filename-then-reset-default.c [Profile] deprecate __llvm_profile_override_default_filename (part2) 2016-07-21 23:19:18 +00:00
instrprof-override-filename-with-env.c [Profile] deprecate __llvm_profile_override_default_filename (part2) 2016-07-21 23:19:18 +00:00
instrprof-override-filename.c [profile] Move __llvm_profile_filename into a separate object 2017-06-29 17:42:24 +00:00
instrprof-path.c [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-reset-counters.c Add space inside the regular expression. 2018-02-08 02:29:56 +00:00
instrprof-set-dir-mode.c [compiler-rt] Add a routine to specify the mode used when creating profile dirs. 2018-07-31 23:37:24 +00:00
instrprof-set-filename-then-reset-default.c
instrprof-set-filename.c [libprofile] Define an expansion `%clang_profgen=` 2016-06-12 04:17:57 +00:00
instrprof-value-prof-2.c [PGO] Fix the buildbots for r266229. 2016-04-13 20:02:07 +00:00
instrprof-value-prof-evict.test [Profile] Test cleanup -- use new lit var for IR PGO tests /NFC 2016-07-19 22:12:00 +00:00
instrprof-value-prof-reset.c [Profile] Fix value profiler eviction bug 2016-11-29 22:00:54 +00:00
instrprof-value-prof.c [profile] Static counter allocation for value profiling (part-2) 2016-05-21 22:55:45 +00:00
instrprof-value-prof.test [Profile] Test cleanup -- use new lit var for IR PGO tests /NFC 2016-07-19 22:12:00 +00:00
instrprof-version-mismatch.c [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-without-libc.c [InstrProf] Port test suite to Windows 2019-02-07 17:52:05 +00:00
instrprof-write-file-atexit-explicitly.c
instrprof-write-file-only.c [libprofile] Adjust dummy condition to be more forgiving. 2016-03-26 04:01:57 +00:00
instrprof-write-file.c
lit.cfg [InstrProf] Implement static profdata registration 2019-02-08 19:03:50 +00:00
lit.site.cfg.in Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 07:03:45 +00:00
runtime_infinite.c [PGO] Test case changes for D41059 2017-12-18 17:56:42 +00:00