Artifacts Associated With Ticket 931e4956b9
Ticket change [453def0871] (rid 151421) by apnadkarni on 2017-01-12 17:41:38:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
What exactly does [info cmdcount] count? Based on below, it does not seem to count either [incr] or [set] though it does count itself. (ip is a slave interp) % ip eval {info cmdcount} 377 % ip eval {incr i} 1 % ip eval {incr i} 2 % ip eval {incr i} 3 % ip eval {incr i} 4 % ip eval {incr i} 5 % ip eval {info cmdcount} 378 % ip eval {set x 1} 1 % ip eval {set x 1} 1 % ip eval {set x 1} 1 % ip eval {set x 1} 1 % ip eval {info cmdcount} 379 - foundin initialized to: "8.6.6"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "47. Bytecode Compiler"
- title initialized to: "Interpreter command count not always incremented"
- type initialized to: "Bug"
Ticket change [cc898ddfe5] (rid 151422) by apnadkarni on 2017-01-12 17:43:00:
- icomment:
Speculation by dgp on the chat: [23:59] apn the [incr i] within the slave interpreter should increment cmdCount for that slave, no? [23:59] dgp One increment happens in the "Dispatch" of any objCmdProc. [23:59] dgp That captures all the "direct eval" of any command. [00:00] apn That's in tclBasic.c [00:00] dgp The other increment is in bytecode execution. [00:00] dgp and has been #ifdef'ed to within an inch of its life. [00:01] dgp and peepholed etc etc. [00:01] dgp Quick, likely faulty analysis..... [00:01] dgp Bytecode execution has given command counting task to INST_START_CMD [00:02] dgp Over time INST_START_CMD was perceived as too much performance drag for too little value, so it's been suppressed in many situations. [00:03] dgp So don't expect bytecode to get correct answers. [00:03] dgp If not for the [interp limit], I'd say just ignore it. [00:04] dgp take a look at the bytecode disassembly for more explorations. [00:04] apn hmm, also turns out that [ip eval {set x 1; set x 1; info cmdcount}] does increment cmdCount correctly [00:05] apn So it's almost like for a single command, INST_START_CMD gets skipped. Or something like that [00:05] dgp "optimized" - login: "apnadkarni"
- mimetype: "text/plain"
- icomment: