On Jan 20, 3:28 pm, Attila Szegedi <[email protected]> wrote: > 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/brows... > > > 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.
Unfortunatly, I'm working in an environment where I am only allowed to code JavaScript, no access to the Rhino implementation code. Any clues how (if at all possible) I could "hook in" such an agent from within JavaScript? For now I'd settle for anything to work in interpreted mode. BTW: I'm using an environment using the DLTK stuff inside Eclipse, so there is allready a debugger connected to Rhino. dunno if it's possible then to do the stuff you're suggesting. K. _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
