[PATCH] ProfileData: A library for reading and writing profiling data

Diego Novillo dnovillo at google.com
Fri Mar 14 06:23:29 PDT 2014



================
Comment at: include/llvm/ProfileData/InstrProf.h:11
@@ +10,3 @@
+// This file contains support for instrumentation based PGO and coverage.
+//
+//===----------------------------------------------------------------------===//
----------------
Document the file format here?

================
Comment at: include/llvm/ProfileData/InstrProfReader.h:82
@@ +81,3 @@
+  /// Return the maximum of all known function counts.
+  uint64_t getMaximumFunctionCount() { return MaxFunctionCount; }
+
----------------
Curious. What is this used for?

================
Comment at: lib/ProfileData/InstrProfReader.cpp:148
@@ +147,3 @@
+                                              uint64_t &FunctionHash,
+                                              std::vector<uint64_t> &Counts) {
+  InstrProfCursor Cursor(DataBuffer.get());
----------------
So, once you get this vector of Counts from here. Do you walk down the AST of the function assigning weights in sequence? What does each entry in 'Counts' represent? Is that the instrumented count corresponding to a line of code?


http://llvm-reviews.chandlerc.com/D3074



More information about the llvm-commits mailing list