示例#1
0
 def _checkpoint(self, msg=None):
     if not self.config.translation.llvm.logging:
         return
     if msg:
         t = (time.time() - self.starttime)
         log('\t%s took %02dm%02ds' % (msg, t/60, t%60))
     else:
         log('GenLLVM:')
     self.starttime = time.time()
示例#2
0
文件: genllvm.py 项目: griels/pypy-sc
 def _checkpoint(self, msg=None):
     if not self.config.translation.llvm.logging:
         return
     if msg:
         t = (time.time() - self.starttime)
         log('\t%s took %02dm%02ds' % (msg, t / 60, t % 60))
     else:
         log('GenLLVM:')
     self.starttime = time.time()
示例#3
0
    def _print_node_stats(self):
        # disable node stats output
        if not self.config.translation.llvm.logging: 
            return 

        nodecount = {}
        for node in self.db.getnodes():
            typ = type(node)
            try:
                nodecount[typ] += 1
            except:
                nodecount[typ] = 1
        stats = [(count, str(typ)) for typ, count in nodecount.iteritems()]
        stats.sort()
        for s in stats:
            log('STATS %s' % str(s))
示例#4
0
文件: genllvm.py 项目: griels/pypy-sc
    def _print_node_stats(self):
        # disable node stats output
        if not self.config.translation.llvm.logging:
            return

        nodecount = {}
        for node in self.db.getnodes():
            typ = type(node)
            try:
                nodecount[typ] += 1
            except:
                nodecount[typ] = 1
        stats = [(count, str(typ)) for typ, count in nodecount.iteritems()]
        stats.sort()
        for s in stats:
            log('STATS %s' % str(s))