cl::ZeroOrMore,
cl::Hidden);
+static cl::opt<bool>
+PrintAllocationRequests("print-alloc-requests",
+ cl::desc("Print allocation requests made to the memory "
+ "manager by RuntimeDyld"),
+ cl::Hidden);
+
/* *** */
// A trivial memory manager that doesn't do anything fancy, just uses the
unsigned Alignment,
unsigned SectionID,
StringRef SectionName) {
+ if (PrintAllocationRequests)
+ outs() << "allocateCodeSection(Size = " << Size << ", Alignment = "
+ << Alignment << ", SectionName = " << SectionName << ")\n";
+
if (UsePreallocation)
return allocateFromSlab(Size, Alignment, true /* isCode */);
unsigned SectionID,
StringRef SectionName,
bool IsReadOnly) {
+ if (PrintAllocationRequests)
+ outs() << "allocateDataSection(Size = " << Size << ", Alignment = "
+ << Alignment << ", SectionName = " << SectionName << ")\n";
+
if (UsePreallocation)
return allocateFromSlab(Size, Alignment, false /* isCode */);