Lines Matching +full:- +full:pie

13 #error This program is for 64-bit ARM only.
18 int fd = -1;
28 fd = syscall(__NR_perf_event_open, &pe, 0, -1, -1, 0); in PerfEvent()
29 if (fd == -1) { in PerfEvent()
149 // Note that TWO separate tricks are needed here to prevent Cortex-A76 in Workload()
151 // 1. A data-dependency whereby the pointers being dereferenced at the in Workload()
154 // 2. A pseudo-random sequence. This is the role of register w0, in Workload()
157 // Cortex-A76 successfully speculates some addresses, resulting in different in Workload()
165 // in [1 .. 2^32-1]. in Workload()
167 // on Cortex-A76 from prefetching data from future loop iterations. in Workload()
171 // w1 := size - 1 = size mask (size is required to be power-of-two). in Workload()
173 // w2 := (pseudorandom value w0) xor (data-dependent sum). in Workload()
178 "and w1, w1, #-64\n" in Workload()
182 // This data-dependency is key to preventing speculative execution on in Workload()
183 // Cortex-A76 from prefetching data from future loop iterations. in Workload()
229 cache_counts->ld_retired = ld_retired.Stop(); in MeasureCacheCounts()
230 cache_counts->mem_access = mem_access.Stop(); in MeasureCacheCounts()
231 cache_counts->ll_cache = ll_cache.Stop(); in MeasureCacheCounts()
232 cache_counts->ll_cache_miss = ll_cache_miss.Stop(); in MeasureCacheCounts()
233 cache_counts->l1d_cache = l1d_cache.Stop(); in MeasureCacheCounts()
234 cache_counts->l1d_cache_refill = l1d_cache_refill.Stop(); in MeasureCacheCounts()
235 cache_counts->l2d_cache = l2d_cache.Stop(); in MeasureCacheCounts()
236 cache_counts->l2d_cache_refill = l2d_cache_refill.Stop(); in MeasureCacheCounts()
237 cache_counts->l3d_cache = l3d_cache.Stop(); in MeasureCacheCounts()
238 cache_counts->l3d_cache_refill = l3d_cache_refill.Stop(); in MeasureCacheCounts()
256 fprintf(stderr, "inconsistent pie-chart\n"); in ~PieChart()
266 PieChart* pie) const = 0;
271 void Analyze(const CacheCounts& cache_counts, PieChart* pie) const override { in Analyze()
272 pie->total = cache_counts.l1d_cache + cache_counts.l1d_cache_refill; in Analyze()
273 pie->l1_hits = cache_counts.l1d_cache - cache_counts.l2d_cache_refill - in Analyze()
275 pie->l2_hits = cache_counts.l1d_cache_refill; in Analyze()
276 pie->l3_hits = cache_counts.l2d_cache_refill; in Analyze()
277 pie->dram_hits = cache_counts.l3d_cache_refill; in Analyze()
283 void Analyze(const CacheCounts& cache_counts, PieChart* pie) const override { in Analyze()
284 pie->total = cache_counts.l1d_cache; in Analyze()
285 pie->l1_hits = cache_counts.l1d_cache - cache_counts.l2d_cache; in Analyze()
286 pie->l2_hits = cache_counts.l2d_cache - cache_counts.l3d_cache; in Analyze()
287 pie->l3_hits = cache_counts.l3d_cache - cache_counts.l3d_cache_refill; in Analyze()
288 pie->dram_hits = cache_counts.l3d_cache_refill; in Analyze()
294 void Analyze(const CacheCounts& cache_counts, PieChart* pie) const override { in Analyze()
295 pie->total = cache_counts.l1d_cache; in Analyze()
298 pie->l1_hits = cache_counts.l1d_cache - corrected_l2; in Analyze()
299 pie->l2_hits = corrected_l2 - corrected_l3; in Analyze()
300 pie->l3_hits = corrected_l3 - cache_counts.l3d_cache_refill; in Analyze()
301 pie->dram_hits = cache_counts.l3d_cache_refill; in Analyze()
307 void Analyze(const CacheCounts& cache_counts, PieChart* pie) const override { in Analyze()
308 pie->total = cache_counts.l1d_cache; in Analyze()
309 pie->l1_hits = cache_counts.l1d_cache - cache_counts.l1d_cache_refill; in Analyze()
310 pie->l2_hits = in Analyze()
311 cache_counts.l1d_cache_refill - cache_counts.l2d_cache_refill; in Analyze()
312 pie->l3_hits = in Analyze()
313 cache_counts.l2d_cache_refill - cache_counts.l3d_cache_refill; in Analyze()
314 pie->dram_hits = cache_counts.l3d_cache_refill; in Analyze()
320 void Analyze(const CacheCounts& cache_counts, PieChart* pie) const override { in Analyze()
321 pie->l1_hits = in Analyze()
322 std::max(0, cache_counts.l1d_cache - cache_counts.l1d_cache_refill); in Analyze()
323 pie->l2_hits = std::max( in Analyze()
324 0, cache_counts.l1d_cache_refill - cache_counts.l2d_cache_refill); in Analyze()
327 pie->l3_hits = std::max(0, cache_counts.l2d_cache_refill - l3_misses); in Analyze()
328 pie->dram_hits = l3_misses; in Analyze()
329 pie->total = pie->l1_hits + pie->l2_hits + pie->l3_hits + pie->dram_hits; in Analyze()
333 void PrintPieChart(const PieChart& pie) { in PrintPieChart() argument
334 printf("total accesses: %d\n", pie.total); in PrintPieChart()
335 double l1_hits_pct = 100. * pie.l1_hits / pie.total; in PrintPieChart()
336 double l2_hits_pct = 100. * pie.l2_hits / pie.total; in PrintPieChart()
337 double l3_hits_pct = 100. * pie.l3_hits / pie.total; in PrintPieChart()
338 double dram_hits_pct = 100. * pie.dram_hits / pie.total; in PrintPieChart()
347 void PrintPieChartCsvNoNewline(const PieChart& pie) { in PrintPieChartCsvNoNewline() argument
348 double l1_hits_pct = 100. * pie.l1_hits / pie.total; in PrintPieChartCsvNoNewline()
349 double l2_hits_pct = 100. * pie.l2_hits / pie.total; in PrintPieChartCsvNoNewline()
350 double l3_hits_pct = 100. * pie.l3_hits / pie.total; in PrintPieChartCsvNoNewline()
351 double dram_hits_pct = 100. * pie.dram_hits / pie.total; in PrintPieChartCsvNoNewline()
367 PieChart pie; in Study() local
368 hypothesis->Analyze(cache_counts, &pie); in Study()
369 PrintPieChartCsvNoNewline(pie); in Study()
377 printf("\n%s:\n", hypothesis->Name()); in Study()
378 PieChart pie; in Study() local
379 hypothesis->Analyze(cache_counts, &pie); in Study()
380 PrintPieChart(pie); in Study()