[PATCH] D60977: [llvm-profdata] Add overlap command to compute similarity b/w two profile files

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 15:44:06 PDT 2019


xur marked 7 inline comments as done.
xur added inline comments.


================
Comment at: llvm/docs/CommandGuide/llvm-profdata.rst:259
+Here c{1|2}_i (i = 1 .. n) are matched counters and c1_u_i (i = 1 .. s)and
+c2_v_i (i = 1 .. v) are unique to *base profile file* and *test profile file*,
+respectively.
----------------
davidxl wrote:
> what does 'unique' mean here?
I changed to "unmatched counters (or counters only existing in) "


================
Comment at: llvm/docs/CommandGuide/llvm-profdata.rst:270
+Here is an example, if *base profile file* has counts of
+{400, 600}, and *test profile file* has matched counts of {60000, 40000}.
+The *overlap* is 80%.
----------------
davidxl wrote:
> This definition of 'overlap' captures branch probability well (relatvie), but loses the information on absolute count.  There should be an option to measure that.
You are right that it does not computer the absolute counter difference. 

The overlap is actually the overlap of distribution of the counts. 
I changed the description a little bit to reflect this.

The summary of the overlap does print out the sum of the counts for both profiles. But the absolute counter difference is not the main purpose.
If I want that, I think it should belong to another sub-command, like "diff".







CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60977/new/

https://reviews.llvm.org/D60977





More information about the llvm-commits mailing list