|
2012-02-06
| ||
| 23:47 | • Closed ticket [3484621fff]: Epoch does not increase when adding a trace plus... artifact: fac47fb19c user: msofer | |
| 22:52 | • Ticket [3484621fff]: 5 changes artifact: 3e19bf45e5 user: msofer | |
| 22:44 | • Ticket [3484621fff]: 4 changes artifact: 94add2ee9c user: sebres | |
| 22:26 | • Ticket [3484621fff]: 4 changes artifact: 0e35468fca user: msofer | |
| 21:37 | • Ticket [3484621fff]: 5 changes artifact: 1c3e9fec66 user: dkf | |
|
2012-02-05
| ||
| 20:08 | • Ticket [3484621fff]: 4 changes artifact: 645e9f0446 user: johannes-kuhn | |
| 19:46 | • Ticket [3484621fff]: 2 changes artifact: e9c83064c2 user: johannes-kuhn | |
| 12:44 | • New ticket [3484621fff]. artifact: f690aee476 user: johannes-kuhn | |
Epoch does not increase when adding a trace
Closed / Fixed3484621fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2012-02-05 12:44:01
Different bytecode depending if there is a trace execution on a (bytecode) inlined command.
Testcase:
proc putargs {args} {puts $args}
proc test1 {t} {if {[string equal $t "test"]} {puts "foo"}}
test1 -; #compile
trace add execution ::string enter putargs
proc test2 {t} [info body test1]; # create a second proc with the same body
test2 -; # compile
tcl::unsupported::disassemble proc test1
tcl::unsupported::disassemble proc test2
johannes-kuhn Ticket [3484621fff]: 2 changes
[History diff]2012-02-05 19:46:06
johannes-kuhnplain2012-02-05 20:08:59
<schelte> Johannes13, I would think the most important issue is that command tracing doesn't work if the trace is defined after the code has been executed before. You don't seem to mention that very clearly.
dkfplain2012-02-06 21:37:27
Ugh, tracing a compiled command should indeed cause the epoch to bump. Yuck (as that causes a lot of cost) but probably unavoidable.
msoferplain2012-02-06 22:26:42
Is this a bug in the trace, or a bug in unsupported::disassemble? I do not see a trace malfunction:
% proc putargs {args} {puts $args}
% proc test1 {t} {if {[string equal $t "test"]} {puts "foo"}}
% test1 -; #compile
% test1 test
foo
% trace add execution ::string enter putargs
% test1 test
{string trim {test1 test}} enter
foo
sebresplain2012-02-06 22:44:43
to Miguel:
the bug is probably by "epoch", cause the trace "string equal" should be displayed.
The output "{string trim {test1 test}} enter" you see, it's an another trace (possible from "history" command of tclsh).
Just create after trace "test2" like this:
% proc test2 {t} {if {[string equal $t "test"]} {puts "foo"}}
% test2 -
{string trim {test2 -}} enter
!!!!!!!!!!!!
{string equal - test} enter
!!!!!!!!!!!!
msoferplain2012-02-06 22:52:24
Indeed - thanks. Upping prio
msoferplain2012-02-06 23:47:03
allow_comments - 1 Fixed in core-8-5-branch and trunk
Log in (anonymous is fine) to add a comment.