Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r208:635770d24676
Date: 2013-01-25 18:12 +0200
http://bitbucket.org/pypy/jitviewer/changeset/635770d24676/
Log: merge
diff --git a/_jitviewer/app.py b/_jitviewer/app.py
--- a/_jitviewer/app.py
+++ b/_jitviewer/app.py
@@ -147,7 +147,7 @@
loop.startlineno)))
loop = loop.chunks[int(e)]
path_so_far.append(e)
- callstack.append((','.join(path_so_far), '%s in %s at %d' % (loop.name,
+ callstack.append((','.join(path_so_far), '%s in %s:%d' % (loop.name,
loop.filename, loop.startlineno)))
if not loop.has_valid_code() or loop.filename is None:
diff --git a/_jitviewer/static/script.js b/_jitviewer/static/script.js
--- a/_jitviewer/static/script.js
+++ b/_jitviewer/static/script.js
@@ -1,6 +1,7 @@
var glob_bridge_state = {
'asm': false,
+ 'bytecodepos': false,
'op': true,
};
@@ -34,6 +35,9 @@
if (!glob_bridge_state.asm) {
$(".asm").hide();
}
+ if (!glob_bridge_state.bytecodepos) {
+ $(".bytecodepos").hide();
+ }
});
}
@@ -83,6 +87,9 @@
if (!glob_bridge_state.asm) {
$(".asm").hide();
}
+ if (!glob_bridge_state.bytecodepos) {
+ $(".bytecodepos").hide();
+ }
$.scrollTo($("#loop-" + bridge_id), {axis:'y'});
});
});
@@ -103,6 +110,21 @@
}
}
+function bytecodepos_toggle()
+{
+ var e = $("#bytecodepos_toggler");
+ var e2 = $(".bytecodepos");
+ if (e.html().search("Show") != -1) {
+ glob_bridge_state.bytecodepos = true;
+ e.html("Hide bytecode position");
+ e2.show();
+ } else {
+ glob_bridge_state.bytecodepos = false;
+ e.html("Show bytecode position");
+ e2.hide();
+ }
+}
+
function highlight_var(elem)
{
$('.' + elem.className).addClass("variable_highlight");
diff --git a/_jitviewer/templates/index.html b/_jitviewer/templates/index.html
--- a/_jitviewer/templates/index.html
+++ b/_jitviewer/templates/index.html
@@ -17,7 +17,8 @@
<body>
<header>
<span>Menu</span><br/>
- <a id="asmtoggler" href="/" onClick="asmtoggle(); return false">Show
assembler</a>
+ <a id="asmtoggler" href="/" onClick="asmtoggle(); return false">Show
assembler</a><br>
+ <a id="bytecodepos_toggler" href="/" onClick="bytecodepos_toggle(); return
false">Show bytecode position</a>
<div id="callstack">
</div>
</header>
diff --git a/_jitviewer/templates/loop.html b/_jitviewer/templates/loop.html
--- a/_jitviewer/templates/loop.html
+++ b/_jitviewer/templates/loop.html
@@ -9,7 +9,7 @@
<div class="operations">
{% for chunk in sourceline.chunks %}
{% if chunk.is_bytecode %}
- <span
class="{{chunk.cssclass}}">{{chunk.html_repr()}}</span><br/>
+ <span class="{{chunk.cssclass}}"><span
class="bytecodepos">{{chunk.bytecode_no}}
</span>{{chunk.html_repr()}}</span><br/>
{% for op in chunk.operations %}
{% if op.name != "debug_merge_point" %}
{% if op.bridge %}
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit