Re: Profiler in Callgrind format

"[email protected]" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Organization http://groups.google.com
Message-ID <[email protected]>
On Dec 15, 6:46 pm, James Ross <[email protected]> wrote:
> [email protected] wrote:
> What do you mean "pre-processed"? Are you referring to the access to
> profiling data? The debugger service is quite sufficient to single-step
> through all the code, although it might be a big performance hit (hardly
> surprising). You'd have to do all the work tracking profile data.
Sorry, I meant summarized times, the kind of information that
jsdIScript gives (callCount, max, min, total).
The callgrind format needs raw data (a lot of data). Let us suppose
that it's possible to observe the SpiderMonkey in every call, so the
caller/callee/time can be stored in memory during the execution. When
the profiling ends, that information can be translated to the callgrind
format. In my limited view, it doesn't seems very difficult! (too much
php here).

> I don't know how feasible trying to do your own XPCOM components for JSD
> is - you'd have to effectively replace the entire thing, I think, as the
> profiling is all down in the C code and not in the XPCOM interface
> (jsd_xpc.cpp) that exposes it to the world.a
Thanks for the advise. I'm not a C-C++ expert by a long shot, but I'm
very excited with the mozilla framework as a whole, first I'll try to
use the step-by-step feature of JSD not worrying about the performance,
then... we will see....

> If you would like to see any of your ideas in JSD in the future, you
> should file bug reports athttps://bugzilla.mozilla.org/(Product: Other
> Applications, Component: JavaScript Debugger). Nothing will happen
> overnight, but it's always better to know what is actually wanted than
> to guess and get it wrong.
Ok, I'll do my homework in the next months.

On Dec 17, 3:54 am, "timeless" <[email protected]> wrote:
> As for your core problem, well, writing something that single steps
> using jsdI shouldn't be impossible, although I'd expect it not to be
> much fun, and I'd recommend you configure it to ignore scripts it isn't
> supposed to profile so that your system has some chance of running.
Is there any way in JSD to focus only some scripts? I mean: only track
information about the scripts in current window content. Viewing
firebug 1.0 beta, I understand that the profiler tracks all open
scripts, in the visualization all the <script> tags are searched and
they src are compared with the fileName that jsdIScript gives. How
Venkman/JSD do that? Can I give it a window content to watch?

Thanks James and timeless for the feedback.

PS: Have you ever tried KCacheGrind? We use it in PHP, with de xdebug
extension.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.