Skip to content
Tcl Source Code History Of Ticket 931e4956b9
Login

History Of Ticket 931e4956b9

Artifacts Associated With Ticket 931e4956b9

  1. Ticket change [453def0871] (rid 151421) by apnadkarni on 2017-01-12 17:41:38:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. 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
      
    5. foundin initialized to: "8.6.6"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "apnadkarni"
    13. subsystem initialized to: "47. Bytecode Compiler"
    14. title initialized to: "Interpreter command count not always incremented"
    15. type initialized to: "Bug"
  2. Ticket change [cc898ddfe5] (rid 151422) by apnadkarni on 2017-01-12 17:43:00:

    1. 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"
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"