On Wednesday 25 February 2004 22:07, you wrote:
> The lock contention problem comes from the nsv_array "0-proc".
> As I understand TTrace module, the <xx>-proc (where xx=0 for me) is the
> array where all the procs are saved (the proc db we can say).
> 0 = the epoch time I suppose.

Correct. So you have only one (first) epoch, meaning that you
haven't called ns_eval (which makes the epoch change).

>
> So this array is locked/unlock a lot of times just for one request in the
> ttrace::getentry proc.

This happens when the "unknown" command triggers because the called
proc can't be found in the running interp.

> I didn't investigate more, but as I understand the "ttrace::getentry" proc
> should be called only when resolving the function.

Correctly. Once per thread and once per proc.

> But adding some ns_log trace, I found the "getentry" proc was called on
> ns_cleanup which is pretty strange (anyway I didn't read carefully all the
> TTrace packages procedures).
>
> So it may be that the ns_cleanup (and so the ttrace::cleanup called in the
> ns_cleanup) could delete all the functions and the functions need to be
> resolved again on the next request in the same thread.

Correct.

>
> I tried to comment the "ttrace::addcleanup { ...}" code and is looks much
> better as getentry is not called tons of times in a request for the same
> thread.

This is what I want to suggest as well.
>
> Unless you really see a problem on the ttrace package, do not waste your
> time as the problem may come from my code !!!
>

I do not think there is a problem in your code. It maybe so that the
cleanup part is really trashing the thing.
It would be good to know if the modified setup is now working
better. If yes, than I might split the proc storage across several
nsv arrays or perhaps make the cleanup part optional.

Cheers
Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to