[PATCH] D20914: [esan|cfrag] Compute the struct field access variance

Qin Zhao via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 12:11:43 PDT 2016


zhaoqin marked 3 inline comments as done.

================
Comment at: lib/esan/cache_frag.cpp:54
@@ -50,2 +53,3 @@
   u64 TotalCount; // The total access count of all structs.
+  u64 TotalDifference;
 };
----------------
aizatsky wrote:
> If we are sticking to a ratio, then Sum(ratios) doesn't make lots of sense.
> 
> This is the whole-program metric, right?
> 
> How about considering (one of) the following metrics (Ci - counts, Ri - ratio):
> 
> 1) Sum(Abs(Ci - C{i+1}))?  - Total "Assymetry". You can divide it by TotalCount to get a relative metric.
> 
> 2) Max(Ri) (Mean, Median, StdDev, GeomMean)
> 
> BTW if you want this in sooner, I suggest you remove TotalDifference from this CL altogether, and let's figure it out in a separate one?
> 
Removed.

================
Comment at: lib/esan/cache_frag.cpp:63
@@ +62,3 @@
+
+// FIXME: we are still exploring proper ways to evaluate the difference between
+// struct field counts.  Currently, we use a simple formula to calculate the
----------------
aizatsky wrote:
> The only reason to use log is to make huge differences look smaller. I suspect that this is not your case - you want huge differences look huge, because CPUs are linear. I approve the use of the linear scale.
ack


http://reviews.llvm.org/D20914





More information about the llvm-commits mailing list