Hm... How about you tried to attach a small profiling agent you write
through Rhino's debugging interface (see
org.mozilla.javascript.Debugger interface). Of course, that only
allows you to profile interpreted mode... OTOH, for profiling compiled
mode, you could just use any Java profiler, as that's JVM bytecode
already.
Attila.
On 2009.01.20., at 14:59, [email protected] wrote:
Hi,
Using Rhino 1.6RC7, I'm trying to do some basic profilling. Maybe
overlooking a far easier method, but this is my approach:
I wrap each function in a wrapper function in which I log the start
and endtime. This all works fine, but I cannot seem to find a way to
get the callstack, like:
called function 1: 25ms, count: 1
called function 2: 8ms, count: 1
called function 3: 6ms, count 2
So function 1 calls 2 which calls 3 two times.
What I need is to determine in my wrapper function who called the
currently executing function.
According the the MDC reference guide, arguments.caller or
arguments.callee.caller should return this, but I'm getting nothing.
I searched this group, but only found this post:
http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/browse_thread/thread/12c9f9d8146ac247/0b4a96b2a7d8a8e8?lnk=gst&q=caller#0b4a96b2a7d8a8e8
But that doesn't indicate if anything ever happened with it.
Anyone got some clues or other directions I ought to be looking into?
Tnx.
K.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino