Closed
Bug 486541
Opened 17 years ago
Closed 14 years ago
using interrupt handler to implement opcode trace dump outside SM
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: igor, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
28.30 KB,
patch
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #486397 +++
The interrupt handler facilities allow to implement the opcode trace dumping outside of SM code in a shell or using a browser extension. We should do it since it would allow to generate opcode trace dumps in non-debug builds.
| Reporter | ||
Comment 1•17 years ago
|
||
The patch moves the tracing implementation into shell/js.cpp. Currently it is not usable in optimized builds as js_Dissamble1 and various helper functions and data like js_CodeNames is not available for non-debug builds. I.e. compare a debug shell output:
js> tracing(true);
1: 00007: popv
inputs: tracing(true) @ 1
stack:
1: 00008: stop
js> var i = 10;
2: 00000: defvar "i"
stack:
2: 00003: int8 10
output: 10 @ 1
stack: 10
2: 00005: setgvar "i"
inputs: 10 @ 1
stack:
2: 00009: stop
versus on optimized version:
js> tracing(true);
1: bytecode 2
inputs: tracing(true) @ 1
stack:
1: bytecode 195
js> var i = 100;
2: bytecode 127
stack:
2: bytecode 227
output: 100 @ 1
stack: 100
2: bytecode 155
inputs: 100 @ 1
stack:
2: bytecode 195
I will address this using a special preprocessor symbol JS_DISASSEMBLE so one can define that to get the same output that is currently only available with debug builds.
But in future it suggests that SM should provide an extra instrumenting library with all those disassembling and tracing helpers. Then the shell can just link against this library and, similarly, it would be simple to provide it as a browser add-on.
Assignee: general → igor
| Reporter | ||
Comment 2•17 years ago
|
||
With the new patch SM build contains disassembling helpers if JS_ASSEMBLER is defined. DEBUG builds always sets the macro but it cam also be enabled for optimized builds. Then one gets fully functional trace() in an optimized build of js shell.
Attachment #370688 -
Attachment is obsolete: true
| Reporter | ||
Updated•14 years ago
|
Assignee: igor → general
Comment 3•14 years ago
|
||
opcode tracing has been removed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•