<div><div>Hi, all</div><div><br></div><div>  Recently I'm trying to use LLVM PGO and autoFDO. However I have some problems in the process. </div><div>  LLVM source code is updated on April 9th. Operating system  is SUSE x86_64</div><div><br></div><div>  1. Problems in instrumentation based PGO:</div><div>  clang -O2 -fprofile-instr-generate test.c -o a.out</div><div>  ./a.out     (then default.profraw is generated)</div><div>  clang -O2 -fprofile-instr-use=default.profraw test.c -o a.out</div><div>  error: pgo data file has malformed function entry</div><div>  I found that the run-time function "writeFile" in InstrProfilingFile.cpp didn't write '\n'. </div><div>  But when parsing the profile data,  in CodeGenPGO.cpp line 56, it tried to find '\n' like below:</div><div>  CurPtr = strchr(CurPtr, '\n');</div><div>  if (!CurPtr) {</div><div>    ReportBadPGOData(CGM, "pgo data file has malformed function entry");</div><div>    return;</div><div>  }</div><div>  </div><div>  2. Problems in autoFDO: </div><div>  Actually the problem happened in using create_llvm_prof, transformation is failed.</div><div>  clang -O2 -g test.c -o a.out</div><div>  perf record -b ./a.out    (perf version is 0.0.2, "-b" option is not recognized, why?)</div><div>  change to: perf record ./a.out   (so perf.data is generated)</div><div>  create_llvm_prof --binary=./a.out --out=code.prof  (it read a.out and perf.data)</div><div>  error: Malformed .note.gnu.build-id section</div><div>           no build id found in the binary</div><div>  it seems that a.out has no build id.</div></div><div><br></div><div>  Someone who can help me?</div><div><br></div><div>  Thanks,</div><div>  Kaidong Chen</div><div><br></div>