[CM] profile: prepend namespace to the function name

Christos Vagias chris.actondev at gmail.com
Mon Sep 27 14:57:26 PDT 2021


Hi Bil,

Was just checking the profile capabilities of s7 and noticed the following:
If there are two separate namespaces (lets) both having function named
foo, their timing info seems to be accumulated (since the timing info
is stored as a lookup table from what I can tell, using only the
functions name as a symbol).

I attach a program that showcases the problem and a naive patch that
uses the 'namespace/function-name as this lookup key.
I'm using *ns-name* in my environment, but could be configurable with
something like (*s7* 'profile-funclet-prefix-symbol).

An entirely different solution would be to add the functions' actual
value to the profile data, so that one can operate its funclet, but
that leaves the symbol conflict to be resolved in some other way,
since I had no idea what to use in the place of symbol_position and
symbol_set_position

What do you think?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: profile-namespace-name.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210927/6fa397af/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: profile-conflict.scm
Type: text/x-scheme
Size: 416 bytes
Desc: not available
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210927/6fa397af/attachment-0001.bin>


More information about the Cmdist mailing list