Index: openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl,v diff -u -r1.1.2.37 -r1.1.2.38 --- openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 25 Jan 2022 23:12:04 -0000 1.1.2.37 +++ openacs-4/packages/acs-tcl/tcl/00-icanuse-procs.tcl 27 Jan 2022 10:27:13 -0000 1.1.2.38 @@ -116,6 +116,8 @@ ::acs::register_icanuse "nsf::parseargs -asdict" [acs::cmd_error_contains {nsf::parseargs} -asdict] ::acs::register_icanuse "ns_parsequery -charset" [acs::cmd_error_contains {ns_parsequery} -charset] ::acs::register_icanuse "ns_reflow_text -offset" [acs::cmd_error_contains {ns_reflow_text} -offset] +::acs::register_icanuse "nsf::config profile" [expr {[info exists ::nsf::config(profile)] ? $::nsf::config(profile) : 0}] + # # At the time "ns_trim -prefix was introduced, a memory leak in # nsv_dict was removed that could lead to a growing size of NaviServer Index: openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl,v diff -u -r1.93.2.45 -r1.93.2.46 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 7 Dec 2021 09:25:53 -0000 1.93.2.45 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 27 Jan 2022 10:27:12 -0000 1.93.2.46 @@ -183,9 +183,22 @@ proc ::nsf::debug::call {level objectInfo methodInfo arglist} { ns_log Warning "DEBUG call($level) - {$objectInfo} {$methodInfo} $arglist" } - proc ::nsf::debug::exit {level objectInfo methodInfo result usec} { - #ns_log Warning "DEBUG exit($level) - {$objectInfo} {$methodInfo} $usec usec -> $result" - ns_log Warning "DEBUG exit($level) - {$objectInfo} {$methodInfo} $usec usec" + + if {[acs::icanuse "nsf::config profile"]} { + # + # The debug call-data of nsf returns only timing information, when + # nsf was compiled with --enable-profile. So, just try to display + # it, when available. + # + proc ::nsf::debug::exit {level objectInfo methodInfo result usec} { + #ns_log Warning "DEBUG exit($level) - {$objectInfo} {$methodInfo} $usec usec -> $result" + ns_log Warning "DEBUG exit($level) - {$objectInfo} {$methodInfo} $usec usec" + } + } else { + proc ::nsf::debug::exit {level objectInfo methodInfo result usec} { + #ns_log Warning "DEBUG exit($level) - {$objectInfo} {$methodInfo} -> $result" + ns_log Warning "DEBUG exit($level) - {$objectInfo} {$methodInfo}" + } } }