get replayable trace from JavaScript execution

View: New views
5 Messages — Rating Filter:   Alert me  

get replayable trace from JavaScript execution

by George-36 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is there a way to collect replayable traces from running JS programs?
By replayable, I mean the trace should capture enough information for
reproducing the same computation, although it might require developing
additional tools to "replay" the computation.

Obviously, my next closely related question is, what is the most
convenient way to develop such a replay tool?

Any suggestions and ideas are very welcome! I appreciate it.

Thanks,
Yan
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine

Re: get replayable trace from JavaScript execution

by Wes Garland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yan:

You won't be able generate traces for entire programs.  The JIT works by
tracing through hot loops and generating multiple code fragments for each by
permuting for variable type change.

That said, you can get both LIR and native code for all the traces generated
by your program sent to stdout by running a debug build of tracemonkey with
the TMFLAGS=full environment variable set.

Wes

On Wed, Nov 4, 2009 at 2:28 PM, Yan Huang <yh8h@...> wrote:

>
> Is there a way to collect replayable traces from running JS programs?
> By replayable, I mean the trace should capture enough information for
> reproducing the same computation, although it might require developing
> additional tools to "replay" the computation.
>
> Obviously, my next closely related question is, what is the most
> convenient way to develop such a replay tool?
>
> Any suggestions and ideas are very welcome! I appreciate it.
>
> Thanks,
> Yan
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-js-engine@...
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>



--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine

Parent Message unknown Re: get replayable trace from JavaScript execution

by George-36 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov 4, 2:38 pm, Wes Garland <w...@...> wrote:

> Yan:
>
> You won't be able generate traces for entire programs.  The JIT works by
> tracing through hot loops and generating multiple code fragments for each by
> permuting for variable type change.
>
> That said, you can get both LIR and native code for all the traces generated
> by your program sent to stdout by running a debug build of tracemonkey with
> the TMFLAGS=full environment variable set.
>
> Wes
>
I could, as well as prefer to work with intermediate representations
used by any particular JS engine, such as
the bytecode used in Spidermonkey. So JIT shouldn't pose problems for
my goal.

What do you mean by LIR?

Thanks,
-- Yan
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine

Parent Message unknown Re: get replayable trace from JavaScript execution

by Boris Zbarsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/4/09 2:38 PM, Wes Garland wrote:
> You won't be able generate traces for entire programs.  The JIT works by
> tracing through hot loops and generating multiple code fragments for each by
> permuting for variable type change.

Yan is talking about trace not in the tracing jit sense but in the "log
of opcodes executed and their operands, so that the program execution
can be replayed" sense.

-Boris
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine

Re: get replayable trace from JavaScript execution

by David Mandelin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11/4/09 11:28 AM, Yan Huang wrote:
>
> Is there a way to collect replayable traces from running JS programs?
> By replayable, I mean the trace should capture enough information for
> reproducing the same computation, although it might require developing
> additional tools to "replay" the computation.

I would certainly think so, but I'm curious what 'level' you would like
to replay at. For example, any program (JS or not) can be replayed if
you record the input, results of system calls, and context switches. But
I'm guessing that's not what you want to do. The natural thing that
occurs to me would be to record the bytecodes executed and some info
about the input and system call results. If you could give some more
description of what you want to do I might be able to give more concrete
ideas.

> Obviously, my next closely related question is, what is the most
> convenient way to develop such a replay tool?
>
> Any suggestions and ideas are very welcome! I appreciate it.
>
> Thanks,
> Yan

--
Dave
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine