PGO: Statically generate data structures

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Mar 14 17:50:17 PDT 2014


In instrumentation-based profiling, we need a set of data structures to
represent the counters.  Previously, these were built up during static
initialization.  This patch shoves them into a specially-named section
so that they link together into an array.

As a consequence of the reorganizing symbols, instrumentation data
structures for linkonce functions are now correctly coalesced.

This is the first step in making instrumentation-based profiling stop
relying on the userspace.

I’ve included both the clang patch and the associated compiler-rt patch
here, since it’s not clear to me how to review one without the other.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgo-static-data-structures-clang.patch
Type: application/octet-stream
Size: 28129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140314/7e1d29dc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgo-static-data-structures-compiler-rt.patch
Type: application/octet-stream
Size: 5574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140314/7e1d29dc/attachment-0001.obj>


More information about the cfe-commits mailing list