Integrated LISP Profiler
Just downloaded the Lisp Developer Support Package, how do you use the LISP Profiler? The manual and last forum post I could find says implemented but documentation yet to come? Is it the same as vl-bt error control? (links below just explain source of my questions)
LISP Profiler (since V12.2)
Requested by LISP developers to get some tools for troubleshooting and problem +
performance analysis and investigations, a LISP Profiler has been added. The
Profiler can be controlled manually, but also at execution time. Results are provided
on commandline and as log file.
It is currently already functional, providing a lot of information about the entire code
execution - but it is still subject for completion, especially to include a GUI interface
and the ability to save and load profiled data sets.
Thanks,
Dan
0
Comments
-
To my knowledge the LISP Profiler is on by default. If you look in the LDSP Help you can find some limited information in the 'BricsCAD Lisp Error Control' section.
The Profiler was introduced in Version 10.3.14.
From the V10 Release Notes:
LISP - improved error handler control:- (vl-bt-on) enables "error callstack backtrace"
- (vl-bt-off) disables "error callstack backtrace"
- (vl-bt [n]) outputs the "error callstack backtrace" to the commandline, regardless of on/off status.
- (setq bcad$disable-extended-error nil) enables error location message
- (setq bcad$disable-extended-error t) disables error location message
To switch off the profiler I use this:
[code](defun _Sys_SilentModeStart ()
(vl-bt-off)
(setq bcad$disable-extended-error T) ; Not sure if this is required.
)[/code]
And to switch it back on:
[code](defun _Sys_SilentModeEnd ()
(vl-bt-on)
(setq bcad$disable-extended-error nil)
)[/code]0 -
Hmm, something is going wrong with the display of the list in my previous post.0
-
Dear All,
fortunately, the "Profiler" is OFF by default :-)
It is already functional - but not yet documented; its intention is to measure Lisp code execution in all details - actually logged to commandline and log file;
but in the end, a small GUI should be more comfortable to see timings for the functions.
It can also be used to compare Lisp code execution on different machines, to identify code flow differences (helps to find "mysterious" problems).
Profiler is completely unrelated to (vl-bt ...) stuff, which is about error reporting.
So Roy's sample is about the error reporting level + output :-)
But I promise, the next LDSP version will document the actual status + usage of the profiler.
many greetings !0 -
Torsten,Thank you for the response (Roy also). Any preview of the commandline log before the GUI comes out? Also will there ever be a VLIDE that allows stepping through lisp commands with variable watch windows in order to debug code? I really miss that from acad.Dan0
-
Dear Dan,
the commandline profiler is already available - only not yet documented (and not tested with extreme Lisp samples) :
(vlisp-profiler T/NIL)
enable or disable the profiler
(vlisp-profiler-extlog T/NIL)
enable or disable extended logging
(vlisp-profiler-mark funcname)
marks a function for the log
(vlisp-profiler-include funcname)
includes specified function for profiling (default is all functions), can be called multiple times
(vlisp-profiler-exclude funcname)
excludes specified function for profiling (default is that no function is excluded), can be called multiple times
(vlisp-profiler-showlog NIL/funcname)
shows + creates the profiler log file for all functions (NIL) or specified function
just play a bit with these functions :-)
VLIDE :
yes, there are ideas to have a kind of Debugger-PlugIn for UltraEdit editor ... great editor, and a perfect base for a "Lisp debugging" plugin ...
mainly to show Lisp code, step through, and display variable values ...
at least, that is the current plan ... but not sure when it will be available.
many greetings !0 -
My main fear of swapping over to Bricscad from Autocad is the lack of a vlide alternative. Please let us know when you have something ready.
Thanks Torsten0
This discussion has been closed.