summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c
Commit message (Collapse)AuthorAgeFilesLines
* Reland compiler-rt support for order file instrumentation.Manman Ren2019-03-081-0/+7
| | | | | | | | | | | | | | r355343 was landed and was reverted in r355363 due to build breakage. This patch adds Linux/Windows support on top of r355343. In this patch, Darwin should be working with testing case. Linux should be working, I will enable the testing case in a follwup diff. Windows/Other should be building. Correct implementation for Other platforms will be added. Thanks David for reviewing the original diff, helping me with issues on Linux, and giving suggestions for adding support for Other platforms. llvm-svn: 355701
* Revert compiler-rt diffs for order file instrumentation to get bot green!Manman Ren2019-03-051-5/+0
| | | | | | | | This caused issues on Linux/Windows and other platforms. r355343 355350 355350 llvm-svn: 355363
* Attemp to fix build brokage due to D57530.Manman Ren2019-03-041-0/+5
| | | | | | By adding implementations for __llvm_profile_begin_orderfile for non-Darwin platforms. llvm-svn: 355350
* [InstrProf] Implement static profdata registrationReid Kleckner2019-02-081-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Add support for LLVM profile for NetBSDKamil Rytarowski2018-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD uses typical UNIX interfaces. All tests pass except instrprof-dlopen-dlclose-gcov.test, as there is not supported semantics of atexit(3) in dlopen(3)ed+dlclose(3)d DSO. NetBSD also ships an older version of LLVM profile (ABI v.2 predating ABI v.4 in upstream version) inside libc. That copy has been manually removed during the porting and testing process of the upstream version to NetBSD. Otherwise there were conflicts between them two. Reviewers: joerg, vitalybuka, vsk Subscribers: srhines, fedor.sergeev, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55997 llvm-svn: 349994
* [profile] Support profiling runtime on FuchsiaPetr Hosek2018-07-251-1/+1
| | | | | | | | | | | | | This ports the profiling runtime on Fuchsia and enables the instrumentation. Unlike on other platforms, Fuchsia doesn't use files to dump the instrumentation data since on Fuchsia, filesystem may not be accessible to the instrumented process. We instead use the data sink to pass the profiling data to the system the same sanitizer runtimes do. Differential Revision: https://reviews.llvm.org/D47208 llvm-svn: 337881
* [profile] Port the runtime to Solaris (retry)Vedant Kumar2017-12-141-2/+4
| | | | | | | | | | | | | This includes a few nice bits of refactoring (e.g splitting out the exclusive locking code into a common utility). Hopefully the Windows support is fixed now. Patch by Rainer Orth! Differential Revision: https://reviews.llvm.org/D40944 llvm-svn: 320731
* Revert "(HEAD -> master, origin/master, origin/HEAD) [profile] Port the ↵Vedant Kumar2017-12-141-4/+2
| | | | | | | | | | | runtime to Solaris" This reverts commit r320726. It looks like flock isn't available on Windows: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/21317/steps/build%20compiler-rt/logs/stdio llvm-svn: 320728
* [profile] Port the runtime to SolarisVedant Kumar2017-12-141-2/+4
| | | | | | | | | | | This includes a few nice bits of refactoring (e.g splitting out the exclusive locking code into a common utility). Patch by Rainer Orth! Differential Revision: https://reviews.llvm.org/D40944 llvm-svn: 320726
* [profile] initialize static pool properly Xinliang David Li2016-05-221-2/+4
| | | | | | | Remove dependency on runtime initializer to avoid issues related to initialization order. llvm-svn: 270371
* [profile] Static counter allocation for value profiling (part-2)Xinliang David Li2016-05-211-0/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D20460 llvm-svn: 270337
* [PGO] cleanup: unify prefix for portability macrosXinliang David Li2015-12-161-15/+16
| | | | llvm-svn: 255748
* [PGO] Unify section name, section symbol definitions (Linux)Xinliang David Li2015-11-231-15/+26
| | | | | | | Replace hard-coded references to names to key section and section symbols with common macro definitions. llvm-svn: 253897
* [PGO] Compiler-rt cleanup -- introduces macros for various macrosXinliang David Li2015-11-231-23/+15
| | | | | | | This makes code more readable and be made more portable in the future. There is no functional change. llvm-svn: 253845
* [PGO] Ensure profile section symbols are created (linux)Xinliang David Li2015-11-131-0/+7
| | | | | | | | | | | | | - This is to handle a corner case where profile lib is linked in but non of the modules are instrumented (On linux, since we avoided the overhead to emit runtime hook use functions so this is the side effect of that size optimization). - Added a profile runtime test case to cover all scenarios of shared library builds. Differential Revision: http://reviews.llvm.org/D14468 llvm-svn: 253098
* [PGO] Eliminate prof data register calls on FreeBSD platformXinliang David Li2015-10-191-1/+1
| | | | | | | This is a follow up patch of r250199 after verifying the start/stop section symbols work as spected on FreeBSD. llvm-svn: 250680
* [PGO]: Eliminate calls to __llvm_profile_register_function for Linux.Xinliang David Li2015-10-131-0/+48
On Linux, the profile runtime can use __start_SECTNAME and __stop_SECTNAME symbols defined by the linker to locate the start and end location of a named section (with C name). This eliminates the need for instrumented binary to call __llvm_profile_register_function during start-up time. llvm-svn: 250200
OpenPOWER on IntegriCloud