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

	handler.replayTracesFromFile(argv[1])
Beispiel #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"
Beispiel #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])
Beispiel #4
0
def main(argv):
    fora.init_local()
    runtime = Runtime.getMainRuntime()
    handler = runtime.getInterpreterTraceHandler()

    handler.replayTracesFromFile(argv[1])