Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cc898ddfe57c9d4ac23d6dc2a987e5f2487eb77f
Ticket: 931e4956b91b4545bb294a76faf82d13e11e74db
Interpreter command count not always incremented
User & Date: apnadkarni on 2017-01-12 17:43:00
Changes

  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"