Helu
* "Denis Papathanasiou"  <[EMAIL PROTECTED]> :

| I'm profiling an application, and since I don't know where to look, I
| start by calling (profile:profile-all).
|
| After the app has run a bit, I run (profile:report-time) on one of the
| functions, and it works, i.e. I get a report as expected.
|
| But when I try to map (profile:report-time) across all the functions
| being profiled (as defined in profile:*timed-functions*), I get this,
| and I'm not sure why:
|
| * (mapcar #'(lambda (fn-name) (profile:report-time fn-name))
| profile:*timed-functions*)
|
| ; Note: Variable FN-NAME defined but never used.
|
|
| Error in FWRAPPERS:FIND-FWRAPPER:  the function FN-NAME is undefined.
|    [Condition of type UNDEFINED-FUNCTION]
|
| profile:*timed-functions* does contain a list of functions, and if I
| try any of those one at a time in (profile:report-time), it works.
|
| So why is the mapping problematic?

PROFILE:PROFILE-TIME is a Macro.

* (macroexpand-1 '(profile:report-time fn-name))

=> (PROFILE::%REPORT-TIMES '(FN-NAME))

i.e.  it ends up looking for #'FN-NAME and so it is not to be used
programatically.  In this respect it is similar to the TRACE/UNTRACE

--
Madhu

Reply via email to