Skip to content

Instantly share code, notes, and snippets.

@methane
Created February 2, 2017 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save methane/b33edbf1f123ae026e704b0e005c3606 to your computer and use it in GitHub Desktop.
Save methane/b33edbf1f123ae026e704b0e005c3606 to your computer and use it in GitHub Desktop.
$ perf stat ./python.default -m performance run -b mako -r
Performance counter stats for './python.default -m performance run -b mako -r':
19307.778115 task-clock (msec) # 0.585 CPUs utilized
632 context-switches # 0.033 K/sec
191 cpu-migrations # 0.010 K/sec
945163 page-faults # 0.049 M/sec
102219040792 cycles # 5.294 GHz
27777883730 stalled-cycles-frontend # 27.17% frontend cycles idle
15855030490 stalled-cycles-backend # 15.51% backend cycles idle
193523548833 instructions # 1.89 insn per cycle
# 0.14 stalled cycles per insn
40264135620 branches # 2085.384 M/sec
347597640 branch-misses # 0.86% of all branches
33.026918905 seconds time elapsed
$ perf stat ./python.patched -m performance run -b mako -r
Performance counter stats for './python.patched -m performance run -b mako -r':
15079.263993 task-clock (msec) # 0.423 CPUs utilized
639 context-switches # 0.042 K/sec
194 cpu-migrations # 0.013 K/sec
944512 page-faults # 0.063 M/sec
110264367110 cycles # 7.312 GHz
36176583497 stalled-cycles-frontend # 32.81% frontend cycles idle
23302398028 stalled-cycles-backend # 21.13% backend cycles idle
189321878449 instructions # 1.72 insn per cycle
# 0.19 stalled cycles per insn
39432308748 branches # 2615.002 M/sec
352216634 branch-misses # 0.89% of all branches
35.629047349 seconds time elapsed
NOTE: Number of instructions are decreased slightly. The problem is insn / cycle.
Performance counter stats for './python.default -m performance run -b mako -r':
666761928 L1-dcache-load-misses
613456531 L1-icache-load-misses
49339774 cache-misses
309471477 L1-dcache-store-misses
32.978880977 seconds time elapsed
Performance counter stats for './python.patched -m performance run -b mako -r':
670959723 L1-dcache-load-misses
697039948 L1-icache-load-misses
49139047 cache-misses
308375381 L1-dcache-store-misses
35.501321551 seconds time elapsed
OK, L1-icache-load-misses is problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment