Front page | perl.perl5.porters |
Postings from August 2016
Interpreting cachegrind output
Thread Next
From:
Father Chrysostomos
Date:
August 5, 2016 05:02
Subject:
Interpreting cachegrind output
Message ID:
20160805050210.6014.qmail@lists-nntp.develooper.com
I have a branch that reduces the number of gv lookups for
qq"@array" from 3 to 2, if I counted them correctly (the tip of the
sprout/pitlookup branch).
Simple benchmarking does not give me any observable results. So I
tried cachegrind, and I see that most numbers are lower in the 'After'
results, but some are not. I do not remember what any of this means.
So, is it worth making this change?
Before:
$ valgrind --tool=cachegrind ./miniperl -we '()="@_"'
==20798== Cachegrind, a cache and branch-prediction profiler
==20798== Copyright (C) 2002-2012, and GNU GPL'd, by Nicholas Nethercote et al.
==20798== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==20798== Command: ./miniperl -we ()="@_"
==20798==
--20798-- warning: L3 cache found, using its data for the LL simulation.
--20798-- warning: pretending that LL cache has associativity 24 instead of actual 16
==20798==
==20798== I refs: 39,273,662
==20798== I1 misses: 19,858
==20798== LLi misses: 4,912
==20798== I1 miss rate: 0.05%
==20798== LLi miss rate: 0.01%
==20798==
==20798== D refs: 9,058,792 (6,566,972 rd + 2,491,820 wr)
==20798== D1 misses: 11,638 ( 7,793 rd + 3,845 wr)
==20798== LLd misses: 6,484 ( 3,370 rd + 3,114 wr)
==20798== D1 miss rate: 0.1% ( 0.1% + 0.1% )
==20798== LLd miss rate: 0.0% ( 0.0% + 0.1% )
==20798==
==20798== LL refs: 31,496 ( 27,651 rd + 3,845 wr)
==20798== LL misses: 11,396 ( 8,282 rd + 3,114 wr)
==20798== LL miss rate: 0.0% ( 0.0% + 0.1% )
After:
$ valgrind --tool=cachegrind ./miniperl -we '()="@_"'
==14950== Cachegrind, a cache and branch-prediction profiler
==14950== Copyright (C) 2002-2012, and GNU GPL'd, by Nicholas Nethercote et al.
==14950== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==14950== Command: ./miniperl -we ()="@_"
==14950==
--14950-- warning: L3 cache found, using its data for the LL simulation.
--14950-- warning: pretending that LL cache has associativity 24 instead of actual 16
==14950==
==14950== I refs: 39,273,090
==14950== I1 misses: 19,779
==14950== LLi misses: 4,885
==14950== I1 miss rate: 0.05%
==14950== LLi miss rate: 0.01%
==14950==
==14950== D refs: 9,058,525 (6,566,785 rd + 2,491,740 wr)
==14950== D1 misses: 11,683 ( 7,833 rd + 3,850 wr)
==14950== LLd misses: 6,485 ( 3,371 rd + 3,114 wr)
==14950== D1 miss rate: 0.1% ( 0.1% + 0.1% )
==14950== LLd miss rate: 0.0% ( 0.0% + 0.1% )
==14950==
==14950== LL refs: 31,462 ( 27,612 rd + 3,850 wr)
==14950== LL misses: 11,370 ( 8,256 rd + 3,114 wr)
==14950== LL miss rate: 0.0% ( 0.0% + 0.1% )
Thread Next
-
Interpreting cachegrind output
by Father Chrysostomos