Author: Antonio Cuni <anto.c...@gmail.com> Branch: extradoc Changeset: r5619:e3308dd709fd Date: 2016-04-02 15:26 +0200 http://bitbucket.org/pypy/extradoc/changeset/e3308dd709fd/
Log: add some slides diff --git a/talk/bucharest2016/jit-frontend/Makefile b/talk/bucharest2016/jit-frontend/Makefile new file mode 100644 --- /dev/null +++ b/talk/bucharest2016/jit-frontend/Makefile @@ -0,0 +1,32 @@ +# you can find rst2beamer.py and inkscapeslide.py here: +# http://bitbucket.org/antocuni/env/src/619f486c4fad/bin/rst2beamer.py +# http://bitbucket.org/antocuni/env/src/619f486c4fad/bin/inkscapeslide.py + + +talk.pdf: talk.rst author.latex stylesheet.latex diagrams/tracing-phases-p0.pdf diagrams/trace-p0.pdf diagrams/tracetree-p0.pdf diagrams/architecture-p0.pdf diagrams/pypytrace-p0.pdf + rst2beamer.py --stylesheet=stylesheet.latex --documentoptions=14pt talk.rst talk.latex || exit + sed 's/\\date{}/\\input{author.latex}/' -i talk.latex || exit + #sed 's/\\maketitle/\\input{title.latex}/' -i talk.latex || exit + pdflatex talk.latex || exit + +view: talk.pdf + evince talk.pdf & + +xpdf: talk.pdf + xpdf talk.pdf & + + +diagrams/tracing-phases-p0.pdf: diagrams/tracing-phases.svg + cd diagrams && inkscapeslide.py tracing-phases.svg + +diagrams/trace-p0.pdf: diagrams/trace.svg + cd diagrams && inkscapeslide.py trace.svg + +diagrams/tracetree-p0.pdf: diagrams/tracetree.svg + cd diagrams && inkscapeslide.py tracetree.svg + +diagrams/architecture-p0.pdf: diagrams/architecture.svg + cd diagrams && inkscapeslide.py architecture.svg + +diagrams/pypytrace-p0.pdf: diagrams/pypytrace.svg + cd diagrams && inkscapeslide.py pypytrace.svg diff --git a/talk/bucharest2016/jit-frontend/diagrams/tracing-phases.svg b/talk/bucharest2016/jit-frontend/diagrams/tracing-phases.svg new file mode 100644 --- /dev/null +++ b/talk/bucharest2016/jit-frontend/diagrams/tracing-phases.svg @@ -0,0 +1,473 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg2" + version="1.1" + inkscape:version="0.48.2 r9819" + width="397.1475" + height="228.3725" + xml:space="preserve" + sodipodi:docname="tracing-phases.svg"><metadata + id="metadata8"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs6" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1286" + inkscape:window-height="838" + id="namedview4" + showgrid="false" + inkscape:zoom="1.8028567" + inkscape:cx="41.424167" + inkscape:cy="90.543544" + inkscape:window-x="1926" + inkscape:window-y="96" + inkscape:window-maximized="0" + inkscape:current-layer="layer8" /><g + inkscape:groupmode="layer" + id="layer8" + inkscape:label="content"><text + xml:space="preserve" + style="font-size:7.55956697px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Sans" + x="-81.325111" + y="36.299587" + id="text5362" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5364" + x="-81.325111" + y="36.299587">interp</tspan><tspan + sodipodi:role="line" + x="-81.325111" + y="45.74905" + id="tspan5366">+tracing</tspan><tspan + sodipodi:role="line" + x="-81.325111" + y="55.198505" + id="tspan5368">+compilation</tspan><tspan + sodipodi:role="line" + x="-81.325111" + y="64.647964" + id="tspan5370">+running</tspan><tspan + sodipodi:role="line" + x="-81.325111" + y="74.097427" + id="tspan5372">+cold_guard</tspan><tspan + sodipodi:role="line" + x="-81.325111" + y="83.546883" + id="tspan5374">+compiled_loop</tspan><tspan + sodipodi:role="line" + x="-81.325111" + y="92.996338" + id="tspan5376">+bridge</tspan><tspan + sodipodi:role="line" + x="-81.325111" + y="102.4458" + id="tspan5378">+hot_guard</tspan></text> + +</g><g + id="g10" + inkscape:groupmode="layer" + inkscape:label="interp" + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline"><g + id="g14" /><g + id="g18"><g + id="g20"><g + id="g22"><g + id="g24" + transform="translate(2.14474,-2.14474)"><path + d="M 29.89998,0 C 29.89998,16.5135 16.5135,29.89998 0,29.89998 -16.5135,29.89998 -29.89998,16.5135 -29.89998,0 c 0,-16.5135 13.38648,-29.89998 29.89998,-29.89998 16.5135,0 29.89998,13.38648 29.89998,29.89998 z" + style="fill:#808080;fill-opacity:0.5;fill-rule:nonzero;stroke:none" + id="path26" + inkscape:connector-curvature="0" /></g></g></g><g + id="g28"><path + d="M 29.89998,0 C 29.89998,16.5135 16.5135,29.89998 0,29.89998 -16.5135,29.89998 -29.89998,16.5135 -29.89998,0 c 0,-16.5135 13.38648,-29.89998 29.89998,-29.89998 16.5135,0 29.89998,13.38648 29.89998,29.89998 z" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path30" + inkscape:connector-curvature="0" /></g><g + id="g32" + transform="translate(-25.879,-1.948)"><g + id="g34"><g + id="g36" + transform="translate(-19.53,-82.523)"><text + transform="matrix(1,0,0,-1,19.53,82.523)" + id="text38"><tspan + style="font-size:7.97009993px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMR8;-inkscape-font-specification:CMR8" + x="0 3.0493603 7.5229774 10.816223 14.579704 17.880123 22.584873 25.88529 29.648771 32.942017 37.176533 40.469776 42.821754 47.056267" + y="0" + sodipodi:role="line" + id="tspan40">Interpretation</tspan></text> + + +<g + id="g42" + transform="translate(19.53,82.523)" /></g></g><g + id="g44" + transform="translate(25.879,1.948)" /></g></g> +</g><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="tracing" + style="display:inline"><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g46"><g + id="g48"><g + id="g50"><g + id="g52" + transform="translate(2.14474,-2.14474)"><path + d="m 95.35454,70.44759 c 0,13.7559 -11.15105,24.90695 -24.90695,24.90695 -13.75591,0 -24.90696,-11.15105 -24.90696,-24.90695 0,-13.75591 11.15105,-24.90696 24.90696,-24.90696 13.7559,0 24.90695,11.15105 24.90695,24.90696 z" + style="fill:#808080;fill-opacity:0.5;fill-rule:nonzero;stroke:none" + id="path54" + inkscape:connector-curvature="0" /></g></g></g><g + id="g56"><path + d="m 95.35454,70.44759 c 0,13.7559 -11.15105,24.90695 -24.90695,24.90695 -13.75591,0 -24.90696,-11.15105 -24.90696,-24.90695 0,-13.75591 11.15105,-24.90696 24.90696,-24.90696 13.7559,0 24.90695,11.15105 24.90695,24.90696 z" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path58" + inkscape:connector-curvature="0" /></g><g + id="g60" + transform="translate(56.447,68.499)"><g + id="g62"><g + id="g64" + transform="translate(-101.856,-152.97)"><text + transform="matrix(1,0,0,-1,101.856,152.97)" + id="text66"><tspan + style="font-size:7.97009993px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMR8;-inkscape-font-specification:CMR8" + x="0 5.4069157 8.7073345 12.941849 16.70533 19.057306 23.762056" + y="0" + sodipodi:role="line" + id="tspan68">Tracing</tspan></text> + + +<g + id="g70" + transform="translate(101.856,152.97)" /></g></g><g + id="g72" + transform="translate(-56.447,-68.499)" /></g></g><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g130"><path + d="m 7.8308,29.22702 c 6.14624,19.1698 18.54745,30.42239 36.0576,34.21565" + style="fill:none;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path132" + inkscape:connector-curvature="0" /><g + id="g134" + transform="matrix(0.97865,0.21199,-0.21199,0.97865,43.8884,63.44267)"><g + id="g136"><path + d="m 0.91655,0 c -1.14568,0.22913 -2.29138,0.68741 -3.66621,1.4894 1.37483,-1.03113 1.37483,-1.94767 0,-2.9788 1.37483,0.80199 2.52053,1.26027 3.66621,1.4894 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path138" + inkscape:connector-curvature="0" /></g></g><g + id="g140"><g + id="g142" + transform="translate(-41.588,57.135)"><g + id="g144"><g + id="g146" + transform="translate(-3.821,-141.606)"><text + transform="matrix(1,0,0,-1,3.821,141.606)" + id="text148"><tspan + style="font-size:6.97380018px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMTI7;-inkscape-font-specification:CMTI7" + x="0 4.2065964 8.4131927 14.163788 16.32218 20.117321 24.323917 31.508326 35.71492 39.512157 42.284939 45.670719 49.467953 52.240734 55.633488" + y="0" + sodipodi:role="line" + id="tspan150">hotloopdetected</tspan></text> + + +<g + id="g152" + transform="translate(3.821,141.606)" /></g></g><g + id="g154" + transform="translate(41.588,-57.135)" /></g></g></g></g><g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="compilation" + style="display:inline"><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g74"><g + id="g76"><g + id="g78"><g + id="g80" + transform="translate(2.14474,-2.14474)"><path + d="m 197.05687,70.44759 c 0,14.90161 -12.07983,26.98144 -26.98145,26.98144 -14.90161,0 -26.98144,-12.07983 -26.98144,-26.98144 0,-14.90162 12.07983,-26.98145 26.98144,-26.98145 14.90162,0 26.98145,12.07983 26.98145,26.98145 z" + style="fill:#808080;fill-opacity:0.5;fill-rule:nonzero;stroke:none" + id="path82" + inkscape:connector-curvature="0" /></g></g></g><g + id="g84"><path + d="m 197.05687,70.44759 c 0,14.90161 -12.07983,26.98144 -26.98145,26.98144 -14.90161,0 -26.98144,-12.07983 -26.98144,-26.98144 0,-14.90162 12.07983,-26.98145 26.98144,-26.98145 14.90162,0 26.98145,12.07983 26.98145,26.98145 z" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path86" + inkscape:connector-curvature="0" /></g><g + id="g88" + transform="translate(147.255,68.455)"><g + id="g90"><g + id="g92" + transform="translate(-192.664,-152.926)"><text + transform="matrix(1,0,0,-1,192.664,152.926)" + id="text94"><tspan + style="font-size:7.97009993px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMR8;-inkscape-font-specification:CMR8" + x="0 6.1162548 10.350769 17.407495 22.112246 24.464222 26.816198 31.050713 34.34396 36.695934 40.93045" + y="0" + sodipodi:role="line" + id="tspan96">Compilation</tspan></text> + + +<g + id="g98" + transform="translate(192.664,152.926)" /></g></g><g + id="g100" + transform="translate(-147.255,-68.455)" /></g></g><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g182"><path + d="m 92.34576,83.0905 c 18.11411,10.92772 35.50846,11.2639 52.09127,2.11029" + style="fill:none;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path184" + inkscape:connector-curvature="0" /><g + id="g186" + transform="matrix(0.87622,-0.48367,0.48367,0.87622,144.43703,85.20079)"><g + id="g188"><path + d="m 0.91655,0 c -1.14568,0.22913 -2.29138,0.68741 -3.66621,1.4894 1.37483,-1.03113 1.37483,-1.94767 0,-2.9788 1.37483,0.80199 2.52053,1.26027 3.66621,1.4894 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path190" + inkscape:connector-curvature="0" /></g></g></g></g><g + inkscape:groupmode="layer" + id="layer3" + inkscape:label="running" + style="display:inline"><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g102"><g + id="g104"><g + id="g106"><g + id="g108" + transform="translate(2.14474,-2.14474)"><path + d="m 265.42998,0 c 0,13.7559 -11.15105,24.90694 -24.90695,24.90694 -13.75591,0 -24.90696,-11.15104 -24.90696,-24.90694 0,-13.7559 11.15105,-24.90694 24.90696,-24.90694 13.7559,0 24.90695,11.15104 24.90695,24.90694 z" + style="fill:#808080;fill-opacity:0.5;fill-rule:nonzero;stroke:none" + id="path110" + inkscape:connector-curvature="0" /></g></g></g><g + id="g112"><path + d="m 265.42998,0 c 0,13.7559 -11.15105,24.90694 -24.90695,24.90694 -13.75591,0 -24.90696,-11.15104 -24.90696,-24.90694 0,-13.7559 11.15105,-24.90694 24.90696,-24.90694 13.7559,0 24.90695,11.15104 24.90695,24.90694 z" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path114" + inkscape:connector-curvature="0" /></g><g + id="g116" + transform="translate(224.702,-1.948)"><g + id="g118"><g + id="g120" + transform="translate(-270.111,-82.523)"><text + transform="matrix(1,0,0,-1,270.111,82.523)" + id="text122"><tspan + style="font-size:7.97009993px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMR8;-inkscape-font-specification:CMR8" + x="0 6.2294302 10.93418 15.63893 20.343679 22.695656 27.400406" + y="0" + sodipodi:role="line" + id="tspan124">Running</tspan></text> + + +<g + id="g126" + transform="translate(270.111,82.523)" /></g></g><g + id="g128" + transform="translate(-224.702,1.948)" /></g></g><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g192"><path + d="m 196.47784,63.3736 c 20.31107,-5.86295 32.43097,-18.45757 36.97692,-36.8283" + style="fill:none;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path194" + inkscape:connector-curvature="0" /><g + id="g196" + transform="matrix(0.24063,-0.97238,0.97238,0.24063,233.45476,26.5453)"><g + id="g198"><path + d="m 0.91655,0 c -1.14568,0.22913 -2.29138,0.68741 -3.66621,1.4894 1.37483,-1.03113 1.37483,-1.94767 0,-2.9788 1.37483,0.80199 2.52053,1.26027 3.66621,1.4894 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path200" + inkscape:connector-curvature="0" /></g></g></g></g><g + inkscape:groupmode="layer" + id="layer4" + inkscape:label="cold_guard" + style="display:inline"><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g202"><path + d="M 224.24709,-19.39551 C 173.87463,-81.7608 72.17174,-83.67355 20.95428,-24.90617" + style="fill:none;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path204" + inkscape:connector-curvature="0" /><g + id="g206" + transform="matrix(-0.65752,0.75444,-0.75444,-0.65752,20.95428,-24.90617)"><g + id="g208"><path + d="m 0.91655,0 c -1.14568,0.22913 -2.29138,0.68741 -3.66621,1.4894 1.37483,-1.03113 1.37483,-1.94767 0,-2.9788 1.37483,0.80199 2.52053,1.26027 3.66621,1.4894 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path210" + inkscape:connector-curvature="0" /></g></g><g + id="g212"><g + id="g214" + transform="translate(93.378,-75.828)"><g + id="g216"><g + id="g218" + transform="translate(-138.787,-8.643)"><text + transform="matrix(1,0,0,-1,138.787,8.643)" + id="text220"><tspan + style="font-size:6.97380018px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMTI7;-inkscape-font-specification:CMTI7" + x="0 3.3857799 7.5923762 9.7507668 16.935177 20.73241 25.144035 29.350632 32.428867 39.613277 42.181728 46.388325 48.956772 51.115166 54.507919" + y="0" + sodipodi:role="line" + id="tspan222">coldguardfailed</tspan></text> + + +<g + id="g224" + transform="translate(138.787,8.643)" /></g></g><g + id="g226" + transform="translate(-93.378,75.828)" /></g></g></g></g><g + inkscape:groupmode="layer" + id="layer5" + inkscape:label="compiled_loop" + style="display:inline"><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g156"><path + d="M 215.66725,-9.05807 C 147.99724,-34.38509 97.67914,-34.84343 29.35406,-10.67384" + style="fill:none;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path158" + inkscape:connector-curvature="0" /><g + id="g160" + transform="matrix(0.93787,0.35104,-0.35104,0.93787,215.66725,-9.05807)"><g + id="g162"><path + d="m 0.91655,0 c -1.14568,0.22913 -2.29138,0.68741 -3.66621,1.4894 1.37483,-1.03113 1.37483,-1.94767 0,-2.9788 1.37483,0.80199 2.52053,1.26027 3.66621,1.4894 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path164" + inkscape:connector-curvature="0" /></g></g><g + id="g166"><g + id="g168" + transform="translate(82.498,-36.794)"><g + id="g170"><g + id="g172" + transform="translate(-127.907,-47.677)"><text + transform="matrix(1,0,0,-1,127.907,47.677)" + id="text174"><tspan + style="font-size:6.97380018px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMTI7;-inkscape-font-specification:CMTI7" + x="0 3.7972341 8.4131927 11.185975 14.98321 18.472898 21.041349 25.657307 32.432354 35.818134 40.024731 46.688892 50.895489 53.46394 55.62233 59.00811 66.19252 68.350914 72.15303 76.359627" + y="0" + sodipodi:role="line" + id="tspan176">enteringcompiledloop</tspan></text> + + +<g + id="g178" + transform="translate(127.907,47.677)" /></g></g><g + id="g180" + transform="translate(-82.498,36.794)" /></g></g></g></g><g + inkscape:groupmode="layer" + id="layer6" + inkscape:label="bridge" + style="display:inline"><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + style="display:inline" + id="g228"><path + d="M 215.52757,3.29033 C 163.03967,10.19096 132.52094,22.82886 92.27628,53.69821" + style="fill:none;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path230" + inkscape:connector-curvature="0" /><g + id="g232" + transform="matrix(-0.79616,0.61072,-0.61072,-0.79616,92.27628,53.69821)"><g + id="g234"><path + d="m 0.91655,0 c -1.14568,0.22913 -2.29138,0.68741 -3.66621,1.4894 1.37483,-1.03113 1.37483,-1.94767 0,-2.9788 1.37483,0.80199 2.52053,1.26027 3.66621,1.4894 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path236" + inkscape:connector-curvature="0" /></g></g><g + id="g238"><g + id="g240" + transform="translate(74.916,11.213)"><g + id="g242"><g + id="g244" + transform="translate(-120.325,-95.684)"><text + transform="matrix(1,0,0,-1,120.325,95.684)" + id="text246"><tspan + style="font-size:6.97380018px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMTI7;-inkscape-font-specification:CMTI7" + x="0 3.7972341 8.2088604 12.415456 15.493691 22.678101 25.246552 29.453146 32.021599 34.179989 38.591614 41.669849" + y="0" + sodipodi:role="line" + id="tspan248">guardfailure</tspan></text> + + +<text + transform="matrix(1,0,0,-1,168.772,95.684)" + id="text250"><tspan + style="font-size:6.97380018px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMSY7;-inkscape-font-specification:CMSY7" + x="0" + y="0" + id="tspan252">→</tspan></text> + + +<text + transform="matrix(1,0,0,-1,179.692,95.684)" + id="text254"><tspan + style="font-size:6.97380018px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMTI7;-inkscape-font-specification:CMTI7" + x="0 4.2065964 8.4131927" + y="0" + sodipodi:role="line" + id="tspan256">hot</tspan></text> + + +<g + id="g258" + transform="translate(120.325,95.684)" /></g></g><g + id="g260" + transform="translate(-74.916,-11.213)" /></g></g></g></g><g + inkscape:groupmode="layer" + id="layer7" + inkscape:label="hot_guard" + style="display:inline"><g + transform="matrix(1.25,0,0,-1.25,56.76125,122.78375)" + id="g262"><path + d="m 247.05948,-24.39468 c 10.55665,-39.39658 -23.62958,-39.39658 -13.64681,-2.14055" + style="fill:none;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path264" + inkscape:connector-curvature="0" /><g + id="g266" + transform="matrix(0.25931,0.96782,-0.96782,0.25931,233.41267,-26.53523)"><g + id="g268"><path + d="m 0.91655,0 c -1.14568,0.22913 -2.29138,0.68741 -3.66621,1.4894 1.37483,-1.03113 1.37483,-1.94767 0,-2.9788 1.37483,0.80199 2.52053,1.26027 3.66621,1.4894 z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.59776002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" + id="path270" + inkscape:connector-curvature="0" /></g></g><g + id="g272"><g + id="g274" + transform="translate(212.551,-62.403)"><g + id="g276"><g + id="g278" + transform="translate(-257.96,-22.068)"><text + transform="matrix(1,0,0,-1,257.96,22.068)" + id="text280"><tspan + style="font-size:6.97380018px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMTI7;-inkscape-font-specification:CMTI7" + x="0 4.2065964 8.4131927 14.163788 17.961021 22.372648 26.579245 29.657478 36.841888 39.410339 43.616936 46.185387 48.343777 51.729557" + y="0" + sodipodi:role="line" + id="tspan282">hotguardfailed</tspan></text> + + +<g + id="g284" + transform="translate(257.96,22.068)" /></g></g><g + id="g286" + transform="translate(-212.551,62.403)" /></g></g></g></g></svg> \ No newline at end of file diff --git a/talk/bucharest2016/jit-frontend/talk.rst b/talk/bucharest2016/jit-frontend/talk.rst --- a/talk/bucharest2016/jit-frontend/talk.rst +++ b/talk/bucharest2016/jit-frontend/talk.rst @@ -15,3 +15,135 @@ - "how we manage to make things fast" + +Part 1 +------- + +**PyPy introduction** + +What is PyPy? +-------------- + +* For most people, the final product: + +|scriptsize| + +.. sourcecode:: python + + $ pypy + Python 2.7.10 (173add34cdd2, Mar 15 2016, 23:00:19) + [PyPy 5.1.0-alpha0 with GCC 4.8.4] on linux2 + >>>> import test.pystone + >>>> test.pystone.main() + Pystone(1.1) time for 50000 passes = 0.0473992 + This machine benchmarks at 1.05487e+06 pystones/second + +|end_scriptsize| + +* More in general: a broader project, ecosystem and community + + +PyPy as a project +------------------ + +* ``rpython``: a fancy compiler + + - source code: "statically typed Python with type inference and metaprogramming" + + - fancy features: C-like performance, GC, meta-JIT + + - "like GCC" (it statically produces a binary) + +|pause| + +* ``pypy``: a Python interpreter + + - "like CPython", but written in RPython + + - CPython : GCC = PyPy : RPython + + + +Important fact +--------------- + +* We **did not** write a JIT compiler for Python + +* The "meta JIT" works with all RPython programs + +* The "Python JIT" is automatically generated from the interpreter + +* Writing an interpreter is vastly easier than a compiler + +* Other interpreters: smalltalk, prolog, ruby, php, ... + + +The final product +------------------ + +* ``rpython`` + ``pypy``: the final binary you download and execute + + - a Python interpreter + + - with a GC + + - with a JIT + + - fast + + + +Part 1 +------ + +**Overview of tracing JITs** + + +Assumptions +----------- + +* Pareto Principle (80-20 rule) + + - the 20% of the program accounts for the 80% of the runtime + + - **hot-spots** + +* Fast Path principle + + - optimize only what is necessary + + - fall back for uncommon cases + +|pause| + +* Most of runtime spent in **loops** + +* Always the same code paths (likely) + + +Tracing JIT +----------- + +* Interpret the program as usual + +* Detect **hot** loops + +* Tracing phase + + - **linear** trace + +* Compiling + +* Execute + + - guards to ensure correctness + +* Profit :-) + + +Tracing JIT phases +------------------- + +.. animage:: diagrams/tracing-phases-p*.pdf + :align: center + :scale: 100% _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit