summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfilingRuntime.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/profile to .cppNico Weber2019-07-311-29/+0
| | | | | | | | See https://reviews.llvm.org/D58620 for discussion. Note how the comment in the file already said ".cpp" :) llvm-svn: 367460
* 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
* [Profile] cleanup: do not reference name directly of vars shared between rt ↵Xinliang David Li2016-07-221-1/+2
| | | | | | and llvm llvm-svn: 276385
* [PGO] cleanup: unify prefix for portability macrosXinliang David Li2015-12-161-1/+1
| | | | llvm-svn: 255748
* [PGO] Improve prof library portabilityXinliang David Li2015-12-151-2/+1
| | | | | | | | | Patch by: Johan Engelen Introduce LLVM_LIBRARY_WEAK macro. Define LLVM_LIBRARY_WEAK and LLVM_LIBRARY_VISIBIITY for MSVC llvm-svn: 255688
* InstrProf: Support profiling dlopen'd shared librariesDuncan P. N. Exon Smith2014-05-171-1/+1
| | | | | | | | | | | | | | | | | | Shared objects are hard. After this commit, we do the right thing when profiling two separate shared objects that have been dlopen'd with `RTLD_LOCAL`, when the main executable is *not* being profiled. This mainly simplifies the writer logic. - At initialization, determine the output filename and truncate the file. Depending on whether shared objects can see each other, this may happen multiple times. - At exit, each executable writes its own profile in append mode. <rdar://problem/16918688> llvm-svn: 209053
* InstrProf: Fix shared object profilingDuncan P. N. Exon Smith2014-05-161-4/+7
| | | | | | | | | | | | | | | | | | Change the API of the instrumented profiling library to work with shared objects. - Most things are now declared hidden, so that each executable gets its own copy. - Initialization hooks up a linked list of writers. - The raw format with shared objects that are profiled consists of a concatenated series of profiles. llvm-profdata knows how to deal with that since r208938. <rdar://problem/16918688> llvm-svn: 208940
* InstrProf: Remove redundant declarationDuncan P. N. Exon Smith2014-05-101-1/+0
| | | | llvm-svn: 208464
* InstrProf: Reorganize files; no functionality changeDuncan P. N. Exon Smith2014-03-211-1/+1
| | | | | | | | | | | | | | | | | | Move functions around to prepare for some other changes. - Merge InstrProfilingExtras.h with InstrProfiling.h. There's no benefit to having these split. - Rename InstrProfilingExtras.c to InstrProfilingFile.c. - Split actual buffer writing code out of InstrProfiling.c into InstrProfilingBuffer.c. - Drive-by corrections of a couple of header comments. <rdar://problem/15943240> llvm-svn: 204497
* PGO: Change runtime prefix from pgo to profileDuncan P. N. Exon Smith2014-03-201-3/+3
| | | | | | | | | | | These functions are in the profile runtime. PGO comes later. Unfortunately, there's only room for 16 characters in a Darwin section, so use __llvm_prf_ instead of __llvm_profile_ for section names. <rdar://problem/15943240> llvm-svn: 204391
* PGO: Update interface for writing instrumentation data to fileDuncan P. N. Exon Smith2014-03-201-1/+1
| | | | | | | | | | | | | | | | | __llvm_pgo_write_default_file() was a bad name, since it checked the environment (it wasn't just a default file). - Change __llvm_pgo_write_file() to __llvm_pgo_write_file_with_name() and make it static. - Rename __llvm_pgo_write_default_file() to __llvm_pgo_write_file(). - Add __llvm_pgo_set_filename(), which sets the filename for subsequent calls to __llvm_pgo_write_file(). <rdar://problem/15943240> llvm-svn: 204381
* PGO: Add explicit static initializationDuncan P. N. Exon Smith2014-03-201-0/+28
Instead of relying on explicit static initialization from translation units, create a new file, InstrProfilingRuntime.cc, with an __llvm_pgo_runtime variable. After this commit (and its pair in clang), the driver will create a use of this variable. Unless the user defines their own version, the new object file will get pulled in, including that C++ static initialization that calls __llvm_pgo_register_write_atexit. The result is that, at least on Darwin, static initialization typically consists of a single function call, which registers a writeout functino atexit. Furthermore, users can skip even this behaviour by defining their own __llvm_pgo_runtime. <rdar://problem/15943240> llvm-svn: 204380
OpenPOWER on IntegriCloud