[PATCH] D19293: [profile] LLVM support for memory-mapping profile counters
David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 12:17:05 PDT 2016
davidxl added inline comments.
================
Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:390
@@ -385,1 +389,3 @@
+void InstrProfiling::emitCounterPadding() {
+ auto PageSize = llvm::sys::Process::getPageSize();
----------------
vsk wrote:
> Hm, I think I misunderstood your question.
>
> To clarify, I'm not sure whether or not other linkers have the same behavior, so I thought it would be safer to always emit the padding.
Can you measure the size overhead (binary, .o files, and raw profile) with clang self build?
A couple of more questions:
1) getPageSize is on host -- not the target -- this is not intended, I think
2) do you assume padding bytes are tail paddings ?
3) With comdats, this may not work -- for instance, some of the comdat function's counters may be reclaimed by the linker thus leading to counter section size not rounded up to the page size.
This is why I think you need a driver level change.
http://reviews.llvm.org/D19293
More information about the llvm-commits
mailing list