def main(argv):
	fora.init_local()
	runtime = Runtime.getMainRuntime()
	handler = runtime.getInterpreterTraceHandler()

	handler.replayTracesFromFile(argv[1])
Exemple #2
0
            add(s)

    print "there are ", len(graphs), " with name ", name

    for g in graphs:
        entryNode = instructionGraph.getRootInstruction(g, None)
        reachable = reachableInstructions(entryNode)

        for n in reachable:
            add(n)

    return allInstructions

if __name__ == '__main__':
    import fora
    fora.init_local()

    i = fora.eval('specialize(demos.MonteCarlo.MonteCarlo, `Member, `a_single_price)')

    if 1:
        print "Evaluating:"
        t0 = time.time()
        fora.eval('demos.MonteCarlo.MonteCarlo.a_single_price')
        print "done evaluating. took ", time.time() - t0

    instructions = reachableInstructions(i)
    graphs = groupInstructionsByGraph(instructions)

    graphsByName = dict([(g.graphName, g) for g in graphs])

    print len(instructions), " instructions"
Exemple #3
0
    print "there are ", len(graphs), " with name ", name

    for g in graphs:
        entryNode = instructionGraph.getRootInstruction(g, None)
        reachable = reachableInstructions(entryNode)

        for n in reachable:
            add(n)

    return allInstructions


if __name__ == '__main__':
    import fora
    fora.init_local()

    i = fora.eval(
        'specialize(demos.MonteCarlo.MonteCarlo, `Member, `a_single_price)')

    if 1:
        print "Evaluating:"
        t0 = time.time()
        fora.eval('demos.MonteCarlo.MonteCarlo.a_single_price')
        print "done evaluating. took ", time.time() - t0

    instructions = reachableInstructions(i)
    graphs = groupInstructionsByGraph(instructions)

    graphsByName = dict([(g.graphName, g) for g in graphs])
Exemple #4
0
def main(argv):
    fora.init_local()
    runtime = Runtime.getMainRuntime()
    handler = runtime.getInterpreterTraceHandler()

    handler.replayTracesFromFile(argv[1])