Skip to content

Commit b140ebc

Browse files
committed
fix date, try to use svg
1 parent 7c498be commit b140ebc

7 files changed

+6
-6
lines changed
-89.4 KB
Binary file not shown.
-67.5 KB
Binary file not shown.
-98.9 KB
Binary file not shown.

posts/2021/09/open-ended-traces.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
.. title: Better JIT Support for Auto-Generated Python Code
33
.. slug: jit-auto-generated-code
4-
.. date: 2021-09-15
4+
.. date: 2021-09-17
55
.. tags:
66
.. category:
77
.. link:
@@ -28,8 +28,8 @@ of their website using [Tornado](https://www.tornadoweb.org/en/stable/) a lot
2828
worse than what various benchmarks suggested. It took some careful digging to
2929
figure out what caused the problem: The slow performance was caused by the huge
3030
functions that the Tornado templating engine creates. These functions lead the
31-
JIT to behave in unproductive ways. This blog post will be about how we fixed
32-
this problem.
31+
JIT to behave in unproductive ways. In this blog post I'll describe why the
32+
problem occurs and how we fixed it.
3333

3434
# Problem
3535

@@ -61,7 +61,7 @@ will mark a called function as uninlinable. The next time we trace the outer
6161
function we won't inline it, leading to a shorter trace, which hopefully fits
6262
the trace limit.
6363

64-
![Diagram illustrating the interaction of the trace limit and inlining](/images/2021-open-ended-traces-01-inlining.png)
64+
![Diagram illustrating the interaction of the trace limit and inlining](/images/2021-open-ended-traces-01-inlining.svg)
6565

6666
In the diagram above we trace a function `f`, which calls a function `g`, which
6767
is inlined into the trace. The trace ends up being too long, so the JIT
@@ -115,7 +115,7 @@ more machine code, that starts from this position. In that way, we can slowly
115115
explore the full gigantic function and add all those parts of the control flow
116116
graph that are actually commonly executed at runtime.
117117

118-
![Diagram showing what happens in the new jit when tracing a huge function](/images/2021-open-ended-traces-02-no-inlining.png)
118+
![Diagram showing what happens in the new jit when tracing a huge function](/images/2021-open-ended-traces-02-no-inlining.svg)
119119

120120
In the diagram we are trying to trace a huge function `f`, which leads to
121121
hitting the trace limit. However, nothing was inlined into the trace, so
@@ -124,7 +124,7 @@ Instead, we mark `f` as "huge". This has the effect that when we trace it again
124124
and are about to hit the trace limit, we end the trace at an arbitrary point by
125125
inserting a guard that always fails.
126126

127-
![Diagram showing what happens in the new jit when tracing a huge function until completion](/images/2021-open-ended-traces-03-complete.png)
127+
![Diagram showing what happens in the new jit when tracing a huge function until completion](/images/2021-open-ended-traces-03-complete.svg)
128128

129129
If this guard failure is executed often enough, we might patch the guard and
130130
add a jump to a further part of the function `f`. This can continue potentially

0 commit comments

Comments
 (0)