List Info

Thread: new profiler (was Re: profiling/optimisation)




new profiler (was Re: profiling/optimisation)
country flaguser name
United States
2008-07-08 10:24:56

On Mon, Jul 7, 2008 at 3:01 PM, Esther Verreau
< everreau%40ccl.northwestern.edu">everreauccl.northwestern.edu> wrote:
&gt; Yes, you should take a look at the profiler extension, it's included in
> the 4.0.2 download.

thanks esther; i must be blind... "RTFM" would have been a perfectly
appropriate response here!

anyway, i played around with the profiler and found it to be
slow and not entirely reliable (i was getting 117 years
as the time taken for one procedure!).

blissfully the source code is all there, so i had enough info to rewrite
it a bit more efficiently, taking the overhead from 440% to 36%, still
more than i'd prefer, but a lot better than the old one.

in case someone might find it useful, i've attached a copy of
the new code. just drop it into the extensions/profiler/src directory, rebuild,
and use:

profiler:set-class "org.nlogo.extensions.profiler.QuickTracer";

to use it (in exactly the same way as the original).

i wonder, is there any way to map from an Activation's return address
to its position in the source code? that way it might be possible to get a bit
more detail out of the profiling without incurring much more
overhead.

thanks for all your ever helpful replies,

rog.

__._,_.___
.

__,_._,___
  
Re: new profiler (was Re: profiling/optimisation)
country flaguser name
United States
2008-07-10 05:54:33

in case anyone's interested, here's a new version of my
profiler code. the output is more human-friendly,
and it should work correctly regardless of where profiler:start
or profiler:stop is called (the old version would have
crashed if profiler:start was called within a procedure).
it also includes code to dump all the result data as a
netlogo data structure, but that requires a slightly different
version of ProfilerExtension.java too.

BTW, is there anywhere that additions/enhancements like
this can be submitted? i could put it on the turtlezero wiki,
but that doesn't really seem to be designed as a software
repository.

cheers,
rog.

__._,_.___
.

__,_._,___
  
Re: new profiler (was Re: profiling/optimisation)
country flaguser name
United States
2008-07-10 09:37:10

> BTW, is there anywhere that additions/enhancements like
>; this can be submitted? i could put it on the turtlezero wiki,
&gt; but that doesn't really seem to be designed as a software
> repository.
>
> cheers,
> rog.

If anyone can offer advice on how to make the netlogo wiki function
well as a software repository for this purpose, I would welcome it.

Doku-wiki has file-upload abilities for media... perhaps that can be
tweaked to support the kinds of files of interest to netlogo modelers,
to, such as nlogo, ahava and jar files.

I'm already wishing for a tidy way to embedd netlogo models into doku
wikik pages... probably need to write a plug-in to make it happen.

~~James

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )