Index: xotcl/library/lib/trace.xotcl =================================================================== diff -u -r1aa7246cc8e44078c9dbd33e03992478615f314f -r20e421dc641dc39b53106b1296ac7e09d0b206f2 --- xotcl/library/lib/trace.xotcl (.../trace.xotcl) (revision 1aa7246cc8e44078c9dbd33e03992478615f314f) +++ xotcl/library/lib/trace.xotcl (.../trace.xotcl) (revision 20e421dc641dc39b53106b1296ac7e09d0b206f2) @@ -1,4 +1,4 @@ -# -*- Tcl -*- $Id: trace.xotcl,v 1.8 2006/09/27 08:12:40 neumann Exp $ +# -*- Tcl -*- $Id: trace.xotcl,v 1.9 2006/10/04 20:40:23 neumann Exp $ package provide xotcl::trace 0.91 package require XOTcl @@ -118,12 +118,14 @@ Trace proc statReport {} { my statReportClass Object } - Trace proc statCount key { + Trace proc statCount {key} { + puts stderr "[self] [self proc] '$key'" if {[my exists stat($key)]} { my incr stat($key) } else { - my incr set stat($key) 1 + my set stat($key) 1 } + puts stderr "[self] [self proc] '$key' => [my set stat($key)]" } Trace proc deprecated-function {name} { puts stderr "Function <$name> is deprecated. Use method with same name instead." @@ -133,9 +135,11 @@ Object instproc traceFilter args { # don't trace the Trace object - if {[self] eq "::Trace"} {return [next]} - set context "[self callingclass]->[self callingproc]" + if {[self] eq "::xotcl::trace::Trace"} {return [next]} set method [self calledproc] + if {$method eq [self proc]} {return [next]} + set context "[self callingclass]->[self callingproc]" + switch -- $method { proc - instproc {set dargs [list [lindex $args 0] [lindex $args 1] ...] } @@ -184,7 +188,7 @@ Object instproc statFilter args { # don't return statistics from the Trace object #puts stderr "self=[self]" - if {[self] eq "::Trace"} {return [next]} + if {[self] eq "::xotcl::trace::Trace"} {return [next]} set ccls [self callingclass] set cmet [self callingproc] set met [self calledproc]