Skip to content
Tcl Source Code View Ticket
Login

View Ticket

add support for command tracing

Closed462580ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 17 years ago
Descriptionplain2001-09-18 16:07:00
The trace command should facilitate tracing of commands
for the following operations: before, after, preinside and postinside.
I will be submitting a TIP to TCT with more details on this request.

I am attaching a patch (originally created by Vince Darley) which 
implements this feature. I am also attaching the results of running
the tclbench with the new feature for performance evaluation.

Hemang.
hemanglavanaplain2001-09-18 23:07:02
File Added - 10931: tracecmd.cdiff
hemanglavanaplain2001-09-18 23:08:47
File Added - 10932: runbench-sunultra5.log

Logged In: YES 
user_id=81875

Here are the results of running tclbench for performance evaluation.
hemanglavanaplain2001-09-19 19:17:38
Logged In: YES 
user_id=81875

TIP # 62: ADD SUPPORT FOR COMMAND TRACING
=============================================
URL:      http://purl.org/tcl/tip/62.html
WebEdit:  http://purl.org/tcl/tip/edit/62
hobbsplain2002-01-17 01:52:59
Logged In: YES 
user_id=72656

this is in 8.4.
hemanglavanaplain2002-01-17 04:02:45
Logged In: YES 
user_id=81875

I beleive this bug was closed and changed to fixed state by 
mistake. Because how can this  be available in 8.4 when 
TIP# 62 is still in "Draft" state?
hobbsplain2002-01-17 04:23:29
Logged In: YES 
user_id=72656

Somehow I thought that had already gotten in.   Ah well...
vincentdarleyplain2002-04-30 01:00:08
Logged In: YES 
user_id=32170

Jeff: how about calling a vote, so this /can/ get into 8.4?
hemanglavanaplain2002-06-16 02:05:20
File Added - 25173: tip62.diff

Logged In: YES 
user_id=81875

I am attaching the updated patch that implements the feature described in TIP# 62. 

Issues related to namespace mechanism (for setting traces on command execution
and rename/delete) are not resolved by this patch. These will be addressed
sometime in the future.
dgpplain2002-06-16 04:10:35
Logged In: YES 
user_id=80530

unless there's some maintainer who objects, please go ahead and
commit this patch so it can reach more testers and maybe start
getting bug fixes before beta.
hobbsplain2002-06-18 05:53:55
Logged In: YES 
user_id=72656

commited 2002-06-17
dgpplain2004-02-28 08:49:50
Logged In: YES 
user_id=80530

It looks like the TIP 62
implementation changed
the "level" interpretation
from iPtr->numLevels
to iPtr->varFramePtr->level,
creating an inconsistency with
Tcl 8.3.

Claiming as I am testing this
theory.
dgpplain2004-02-28 10:14:42
Logged In: YES 
user_id=80530


Apply test.patch to both
Tcl 8.3.5 and to Tcl 8.4.6.
Then run the basic.test file
in the test suite, and see that
test basic-39.10 passes in 8.3.5
and fails in 8.4.6, demonstrating
the incompatibility introduced
in the operation of Tcl_CreateTrace().
dgpplain2004-02-28 10:14:43
File Added - 78310: test.patch
dgpplain2004-02-28 10:23:27
Logged In: YES 
user_id=80530


The fix is very simple.  Change
line 4308 of tclCmdMZ.c from

    curLevel = ((iPtr->varFramePtr == NULL) ? 0 :
iPtr->varFramePtr->level);

to

    curLevel = iPtr->numLevels;

Porting this fix to the HEAD will involve
tracking where things moved to
in tclTrace.c.
dgpplain2004-03-02 00:40:38
Logged In: YES 
user_id=80530


Fix committed to HEAD and
to core-8-4-branch.  RE can
decide whether to include in
8.4.6 release.
dkf Ticket [462580ffff]: 1 change [History diff]2004-03-03 18:05:05
dkfplain2008-11-02 18:26:57
data_type - 210894
dkfplain2009-07-29 19:52:00
IP - Comment Removed: 130.88.1.31
Log in (anonymous is fine) to add a comment.

Attachments: