2013-09-28 05:30:57 +00:00
|
|
|
<div class="pd w0 h0"><div id="pf9" class="pf" data-page-no="9"><div class="pc pc9"><div class="t m0 x34 h5 y5b ff2 fs3 fc0 sc0 ls0 ws0">When<span class="_ _6"> </span>a<span class="_ _6"> </span>trace<span class="_ _6"> </span>call<span class="_ _6"> </span>returns,<span class="_ _6"> </span>the<span class="_ _6"> </span>monitor<span class="_ _6"> </span>restores<span class="_ _6"> </span>the<span class="_ _6"> </span>interpreter</div><div class="t m0 x2f h5 y5c ff2 fs3 fc0 sc0 ls0 ws0">state.<span class="_ _8"> </span>First,<span class="_ _8"> </span>the<span class="_ _8"> </span>monitor<span class="_ _8"> </span>checks<span class="_ _8"> </span>the<span class="_ _8"> </span>reason<span class="_ _8"> </span>for<span class="_ _8"> </span>the<span class="_ _d"> </span>trace<span class="_ _6"> </span>exit<span class="_ _8"> </span>and</div><div class="t m0 x2f h5 y5d ff2 fs3 fc0 sc0 ls0 ws0">applies<span class="_ _6"> </span>blacklisting<span class="_ _6"> </span>if<span class="_ _6"> </span>needed.<span class="_ _6"> </span>Then,<span class="_ _6"> </span>it<span class="_ _6"> </span>pops<span class="_ _6"> </span>or<span class="_ _6"> </span>synthesizes<span class="_ _6"> </span>inter-</div><div class="t m0 x2f h5 y5e ff2 fs3 fc0 sc0 ls0 ws0">preter<span class="_ _3"> </span>Ja<span class="_ _2"></span>v<span class="_ _2"></span>aScript<span class="_ _5"> </span>call<span class="_ _3"> </span>stack<span class="_ _5"> </span>frames<span class="_ _3"> </span>as<span class="_ _5"> </span>needed.<span class="_ _3"> </span>Finally<span class="_ _b"></span>,<span class="_ _3"> </span>it<span class="_ _5"> </span>copies<span class="_ _3"> </span>the</div><div class="t m0 x2f h5 y5f ff2 fs3 fc0 sc0 ls0 ws0">imported<span class="_ _3"> </span>v<span class="_ _2"></span>ariables<span class="_ _3"> </span>back<span class="_ _3"> </span>from<span class="_ _5"> </span>the<span class="_ _3"> </span>trace<span class="_ _3"> </span>acti<span class="_ _2"></span>v<span class="_ _2"></span>ation<span class="_ _3"> </span>record<span class="_ _3"> </span>to<span class="_ _5"> </span>the<span class="_ _3"> </span>in-</div><div class="t m0 x2f h5 y60 ff2 fs3 fc0 sc0 ls0 ws0">terpreter<span class="_ _5"> </span>state.</div><div class="t m0 x34 h5 y61 ff2 fs3 fc0 sc0 ls0 ws0">At<span class="_ _3"> </span>least<span class="_ _3"> </span>in<span class="_ _3"> </span>the<span class="_ _5"> </span>current<span class="_ _3"> </span>implementation,<span class="_ _3"> </span>these<span class="_ _3"> </span>steps<span class="_ _3"> </span>ha<span class="_ _2"></span>ve<span class="_ _3"> </span>a<span class="_ _5"> </span>non-</div><div class="t m0 x2f h5 y62 ff2 fs3 fc0 sc0 ls0 ws0">negligible<span class="_ _3"> </span>runtime<span class="_ _6"> </span>cost,<span class="_ _3"> </span>so<span class="_ _3"> </span>minimizing<span class="_ _6"> </span>the<span class="_ _3"> </span>number<span class="_ _6"> </span>of<span class="_ _3"> </span>interpreter-</div><div class="t m0 x2f h5 y63 ff2 fs3 fc0 sc0 ls0 ws0">to-trace<span class="_ _6"> </span>and<span class="_ _6"> </span>trace-to-interpreter<span class="_ _3"> </span>transitions<span class="_ _6"> </span>is<span class="_ _6"> </span>essential<span class="_ _6"> </span>for<span class="_ _6"> </span>perfor<span class="_ _2"></span>-</div><div class="t m0 x2f h5 y7 ff2 fs3 fc0 sc0 ls0 ws0">mance.<span class="_ _d"> </span>(see<span class="_ _8"> </span>also<span class="_ _d"> </span>Section<span class="_ _d"> </span>3.3).<span class="_ _8"> </span>Our<span class="_ _d"> </span>experiments<span class="_ _8"> </span>(see<span class="_ _d"> </span>Figure<span class="_ _8"> </span>12)</div><div class="t m0 x2f h5 y64 ff2 fs3 fc0 sc0 ls0 ws0">show<span class="_ _8"> </span>that<span class="_ _d"> </span>for<span class="_ _8"> </span>programs<span class="_ _d"> </span>we<span class="_ _8"> </span>can<span class="_ _d"> </span>trace<span class="_ _8"> </span>well<span class="_ _d"> </span>such<span class="_ _8"> </span>transitions<span class="_ _d"> </span>hap-</div><div class="t m0 x2f h5 y66 ff2 fs3 fc0 s
|