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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 10:59:44 PDT 2019


davidxl added inline comments.


================
Comment at: llvm/docs/CommandGuide/llvm-profdata.rst:240
+OVERLAP
+----
+
----------------
match underscore length with word.


================
Comment at: llvm/docs/CommandGuide/llvm-profdata.rst:250
+
+:program:`llvm-profdata show` takes two profile data files and displays the
+*overlap* information between the whole files and between any of the specified functions.
----------------
show --> overlap


================
Comment at: llvm/docs/CommandGuide/llvm-profdata.rst:253
+
+In this command, *overlap* is defined the follows:
+Suppose *base profile file* has the following counts:
----------------
as follows


================
Comment at: llvm/docs/CommandGuide/llvm-profdata.rst:258
+{c2_1, c2_2, ..., c2_n, c2_v_1, c2_v_2, ..., c2_v_t}.
+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*,
----------------
add space between ')' and 'and'


================
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.
----------------
what does 'unique' mean here?


================
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%.
----------------
This definition of 'overlap' captures branch probability well (relatvie), but loses the information on absolute count.  There should be an option to measure that.


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

https://reviews.llvm.org/D60977





More information about the llvm-commits mailing list