Displaying 3 results from an estimated 3 matches for "callgraphbuff".
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael,
On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote:
> However, do we need to start with instrumentation? The original paper
> uses sampling with good results and current intel cpus can record every
> branch in a program.
>
> I would propose starting with just an lld patch that reads the call
> graph from a file. The format would be very similar to
2017 Jun 15
7
[RFC] Profile guided section layout
...ile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
if (Name == ".eh_frame" && !Config->Relocatable)
return make<EhInputSection>(this, &Sec, Name);
+ // Profile data.
+ if (Name == ".note.llvm.callgraph") {
+ ArrayRef<uint8_t> CallgraphBuff =
+ check(this->getObj().getSectionContents(&Sec));
+
+ StringRef Buff((const char *)CallgraphBuff.data(), CallgraphBuff.size());
+
+ auto ReadString = [&Buff]() {
+ size_t F = Buff.find_first_of(" \n");
+ StringRef Ret = Buff.substr(0, F);
+ Buff =...
2017 Jul 31
2
[RFC] Profile guided section layout
...ile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
if (Name == ".eh_frame" && !Config->Relocatable)
return make<EhInputSection>(this, &Sec, Name);
+ // Profile data.
+ if (Name == ".note.llvm.callgraph") {
+ ArrayRef<uint8_t> CallgraphBuff =
+ check(this->getObj().getSectionContents(&Sec));
+
+ StringRef Buff((const char *)CallgraphBuff.data(), CallgraphBuff.size());
+
+ auto ReadString = [&Buff]() {
+ size_t F = Buff.find_first_of(" \n");
+ StringRef Ret = Buff.substr(0, F);
+ Buff =...