removed some log.info to reduce log size

parent cc80b864
......@@ -425,7 +425,7 @@ class RPythonAnnotator(object):
def binding(self, arg):
"Gives the SomeValue corresponding to the given Variable or Constant."
log.info('annrpython.arg = %s' % arg.__str__())
# log.info('annrpython.arg = %s' % arg.__str__())
s_arg = self.annotation(arg)
if s_arg is None:
raise KeyError
......@@ -521,9 +521,9 @@ class RPythonAnnotator(object):
if graph:
graphs[graph] = True
log.info("ann.simplify.found %d graphs" % len(graphs))
# log.info("ann.simplify.found %d graphs" % len(graphs))
for graph in graphs:
log.info("eliminate_empty_blocks for %s" % graph.name)
# log.info("eliminate_empty_blocks for %s" % graph.name)
simplify.eliminate_empty_blocks(graph)
# try:
......
......@@ -2325,8 +2325,8 @@ logger = AnsiLogger("LLType")
def getfunctionptr(graph, getconcretetype=_getconcretetype):
"""Return callable given a Python function."""
logger.info('getfunctionptr for graph: %s' % graph.__str__())
logger.info('with args %s' % graph.getargs().__str__())
# logger.info('getfunctionptr for graph: %s' % graph.__str__())
# logger.info('with args %s' % graph.getargs().__str__())
llinputs = [getconcretetype(v) for v in graph.getargs()]
lloutput = getconcretetype(graph.getreturnvar())
......
......@@ -334,7 +334,7 @@ class RPythonTyper(object):
varmapping[v] = v # records existing Variables
for hop in self.highlevelops(block, newops):
logger.info('HOP detected: %s' % hop.__str__())
# logger.info('HOP detected: %s' % hop.__str__())
try:
hop.setup() # this is called from here to catch TyperErrors...
self.translate_hl_to_ll(hop, varmapping)
......@@ -656,13 +656,13 @@ class HighLevelOp(object):
self.llops = llops
def setup(self):
logger.info("HLO.setup op is: %s" % self.spaceop.opname)
# logger.info("HLO.setup op is: %s" % self.spaceop.opname)
rtyper = self.rtyper
spaceop = self.spaceop
self.args_v = list(spaceop.args)
self.args_s = [rtyper.binding(a) for a in spaceop.args]
logger.info("self.args_s = %s" % self.args_s.__str__())
logger.info('spaceop.result = %s' % spaceop.result.__str__())
# logger.info("self.args_s = %s" % self.args_s.__str__())
# logger.info('spaceop.result = %s' % spaceop.result.__str__())
self.s_result = rtyper.binding(spaceop.result)
self.args_r = [rtyper.getrepr(s_a) for s_a in self.args_s]
self.r_result = rtyper.getrepr(self.s_result)
......
......@@ -256,7 +256,7 @@ class MuDatabase:
# graphs
for g in self.tlc.graphs:
graph_name = man.get_graph_name(g)
log.info("assign_mu_name to %s" % graph_name)
# log.info("assign_mu_name to %s" % graph_name)
g.name = graph_name[1:] # without @
self.mu_name_map[g] = graph_name
for i, blk in enumerate(g.iterblocks()):
......
......@@ -249,7 +249,7 @@ class MuBundleGen:
self.log.gen_types("declaring %d types..." % len(self.db.types))
for T in self.db.types:
_id = self._id_of(T)
self.log.info('id: %d, type: %s' % (_id, T))
# self.log.info('id: %d, type: %s' % (_id, T))
if isinstance(T, mutype.MuIntType):
self.bdr.new_type_int(_id, T.BITS)
elif T == mutype.MU_FLOAT:
......@@ -710,16 +710,16 @@ class MuBundleGen:
try:
_id = self.idmap[entity]
except KeyError as err:
self.log.info("genmu._id_of KeyError")
self.log.info("idmap length = %d" % len(self.idmap))
self.log.info("mu_name_map length = %d" % len(self.db.mu_name_map))
self.log.info("mu_name_map[entity] = %s" % self.db.mu_name_map[entity].__str__())
for key in self.idmap:
self.log.info("KEY:")
self.log.info("%s" % key.__str__())
self.log.info("id:")
self.log.info("%s" % self.idmap[key].__str__())
# self.log.info("genmu._id_of KeyError")
# self.log.info("idmap length = %d" % len(self.idmap))
# self.log.info("mu_name_map length = %d" % len(self.db.mu_name_map))
# self.log.info("mu_name_map[entity] = %s" % self.db.mu_name_map[entity].__str__())
#
# for key in self.idmap:
# self.log.info("KEY:")
# self.log.info("%s" % key.__str__())
# self.log.info("id:")
# self.log.info("%s" % self.idmap[key].__str__())
raise err
......@@ -774,7 +774,7 @@ class MuBundleGen:
self.reloc_obj_map[obj] = (sym_str, hdl)
# self.obj_hdl_map[obj] = hdl
self.log.info("objs enumerated")
# self.log.info("objs enumerated")
for obj in self.db.objtracer.heap_objs:
self._init_heap_obj(obj)
......@@ -785,7 +785,7 @@ class MuBundleGen:
self.log.init_heap(
'initialising heap objects... (%d/%d %d%%)' % (count, total, count * 100 / total))
self.log.info("heap objs inited")
# self.log.info("heap objs inited")
for obj in self.db.objtracer.fixed_objs:
self._init_fixed_obj(obj)
......@@ -796,7 +796,7 @@ class MuBundleGen:
self.log.init_heap(
'initialising heap objects... (%d/%d %d%%)' % (count, total, count * 100 / total))
self.log.info("fixed objs inited")
# self.log.info("fixed objs inited")
# store to global cells
for gcl_c in self.db.gcells:
......@@ -829,7 +829,7 @@ class MuBundleGen:
# hdl = self.ctx.get_addr(hgcl_obj)
self.reloc_obj_map[fixed_obj] += (hgcl,)
self.log.info("stored to global cells")
# self.log.info("stored to global cells")
def _init_heap_obj(self, obj, hiref=None):
MuT = mutype.mutypeOf(obj)
......
......@@ -20,7 +20,7 @@ __prim_map = {
def mu_sizeOf(mutype):
logger.info('layout.mu_sizeOf %s' % mutype.__str__())
# logger.info('layout.mu_sizeOf %s' % mutype.__str__())
if isinstance(mutype, MuHybrid):
raise TypeError("Cannot get size of MuHybrid type.")
if mutype is MU_VOID:
......
......@@ -375,7 +375,7 @@ class LL2MuMapper:
if isinstance(llv, lltype._abstract_ptr) \
else (self._val_cache, llv)
LLT = lltype.typeOf(llv)
log.info('value type %s' % LLT)
# log.info('value type %s' % LLT)
key = (LLT, v)
try:
return cache[key]
......@@ -460,11 +460,11 @@ class LL2MuMapper:
def map_value_stt(self, llv, building=False):
LLT = lltype.typeOf(llv)
log.info('map_value_stt.llv = %s, of type: %s' % (llv, LLT))
log.info('map_value_stt.building = %s' % building)
# log.info('map_value_stt.llv = %s, of type: %s' % (llv, LLT))
# log.info('map_value_stt.building = %s' % building)
if self._is_rtmu_obj_type(LLT):
log.info('map rtmu stt value: %s of type %s' % (llv, LLT))
# log.info('map rtmu stt value: %s of type %s' % (llv, LLT))
MuT = self.map_type(LLT)
# return MuT._null()
return None
......@@ -499,7 +499,7 @@ class LL2MuMapper:
return self.map_value_varstt(llv)
MuT = self.map_type(LLT)
log.info('map_value_stt.mapped to mutype: %s' % MuT)
# log.info('map_value_stt.mapped to mutype: %s' % MuT)
if MuT is mutype.MU_VOID: # empty struct, struct<>
return None
......@@ -584,18 +584,18 @@ class LL2MuMapper:
return hyb
def map_value_ptr(self, llv):
log.info('map_value_ptr for %s' % llv.__str__())
# log.info('map_value_ptr for %s' % llv.__str__())
LLT = lltype.typeOf(llv)
log.info('pointer to type %s' % LLT.__str__())
# log.info('pointer to type %s' % LLT.__str__())
MuT = self.map_type(LLT)
log.info('mapped mutype: %s' % MuT.__str__())
# log.info('mapped mutype: %s' % MuT.__str__())
# if self._is_rtmu_obj_type(LLT):
# log.info('map rtmu ptr value: %s' % llv.__str__())
# MuT = self.map_type(LLT)
# return MuT._null()
log.info("llv._obj0, _obj = %s, %s" % (llv._obj0, llv._obj))
# log.info("llv._obj0, _obj = %s, %s" % (llv._obj0, llv._obj))
if llv._obj0 is None:
return MuT._null()
......@@ -604,7 +604,7 @@ class LL2MuMapper:
return self.map_value_funcptr(llv)
ref = MuT._null() # set object later
log.info('ref = %s of type: %s' % (ref, mutype.mutypeOf(ref)))
# log.info('ref = %s of type: %s' % (ref, mutype.mutypeOf(ref)))
if not isinstance(MuT, mutype.RTMuType):
self._pending_ptr_values.append((llv._obj, ref))
......@@ -618,10 +618,10 @@ class LL2MuMapper:
def resolve_ptr_values(self):
while len(self._pending_ptr_values) > 0:
llv, ref = self._pending_ptr_values.pop()
log.info('resolve_ptr_values.llv: %s' % llv)
log.info('resolve_ptr_values.ref: %s' % ref)
# log.info('resolve_ptr_values.llv: %s' % llv)
# log.info('resolve_ptr_values.ref: %s' % ref)
obj = self.map_value(llv)
log.info('resolve_ptr_values.obj %s' % obj)
# log.info('resolve_ptr_values.obj %s' % obj)
if isinstance(ref, mutype._muref):
ref._obj = obj # directly set _obj in _muref
elif isinstance(ref, mutype._muweakref):
......@@ -679,9 +679,9 @@ class LL2MuMapper:
raise AssertionError(
"Value {:r} of type {:r} shouldn't appear.".format(llv, type(llv)))
log.info("map_value_adrofs llv = %s" % llv.__str__())
# log.info("map_value_adrofs llv = %s" % llv.__str__())
MuT = self.map_type(lltype.typeOf(llv))
log.info("map_value_adrofs MuT = %s" % MuT.__str__())
# log.info("map_value_adrofs MuT = %s" % MuT.__str__())
return MuT._val_type(rec(llv))
def map_value_opq(self, llv):
......@@ -730,14 +730,14 @@ class LL2MuMapper:
:return: [SpaceOperation]
"""
log.info('map_op: %s' % llop.opname)
log.info('args: %s' % llop.args)
# log.info('map_op: %s' % llop.opname)
# log.info('args: %s' % llop.args)
tys = []
for arg in llop.args:
tys.append(arg.concretetype)
log.info('arg types: %s' % tys)
# log.info('arg types: %s' % tys)
if hasattr(self, 'map_op_' + llop.opname):
return getattr(self, 'map_op_' + llop.opname)(llop)
......@@ -870,7 +870,7 @@ class LL2MuMapper:
# log.info('res not uptr')
if copy_id is not 0:
log.info('_prepare_rtmu_call_op.copy_id = %d' % copy_id)
# log.info('_prepare_rtmu_call_op.copy_id = %d' % copy_id)
# ng = fr.graph.rtmu_graphs[copy_id]
ng = rtzebu.get_rtmu_copy(fr.graph, copy_id)
assert ng
......@@ -906,7 +906,7 @@ class LL2MuMapper:
if a.concretetype == ARG:
call_args.append(a)
else:
log.info('_prepare_call_args: %s != %s' % (a.concretetype, ARG))
# log.info('_prepare_call_args: %s != %s' % (a.concretetype, ARG))
a_cast = varof(ARG)
ops.extend(self.map_op_force_cast(
SpaceOperation('force_cast', [a], a_cast)))
......@@ -915,7 +915,7 @@ class LL2MuMapper:
def map_op_direct_call(self, llop):
fr = llop.args[0].value
log.info('map_op_direct_call %s' % llop.args)
# log.info('map_op_direct_call %s' % llop.args)
args = []
ops = []
......@@ -1215,15 +1215,15 @@ class LL2MuMapper:
def _getfieldiref(self, var, fldname_c):
ops = []
MuT = var.concretetype
log.info("_getfieldiref.MuT = %s" % MuT)
# log.info("_getfieldiref.MuT = %s" % MuT)
fldname = fldname_c.value
cls = mutype.MuUPtr if isinstance(
MuT, mutype.MuUPtr) else mutype.MuIRef
log.info('_getfieldiref.cls = %s' % cls)
# log.info('_getfieldiref.cls = %s' % cls)
# RTMU
fld = getattr(MuT.TO, fldname)
log.info('fld: %s' % fld)
# log.info('fld: %s' % fld)
# if isinstance(MuT, mutype.MuObjectRef) and isinstance(fld, mutype.MuObjectRef) \
# and not (isinstance(MuT, mutype.MuRef) and isinstance(fld, mutype.MuRef)):
# global fld
......@@ -1676,8 +1676,8 @@ class LL2MuMapper:
DST = llop.result.concretetype
SRC = var.concretetype
log.info('map_op_cast_pointer.SRC = %s' % SRC)
log.info('map_op_cast_pointer.DST = %s' % DST)
# log.info('map_op_cast_pointer.SRC = %s' % SRC)
# log.info('map_op_cast_pointer.DST = %s' % DST)
###############
# rtmu specific conversion for casts following ralloc, ealloc, ...
......@@ -2204,9 +2204,9 @@ class LL2MuMapper:
def gen_mu_getfieldiref(self, iref, fldname, res=None):
assert isinstance(iref.concretetype, (mutype.MuIRef, mutype.MuUPtr))
log.info('gen_mu_getfieldiref.iref type: %s' % iref.concretetype)
if res:
log.info('gen_mu_getfieldiref.res type: %s' % res.concretetype)
# log.info('gen_mu_getfieldiref.iref type: %s' % iref.concretetype)
# if res:
# log.info('gen_mu_getfieldiref.res type: %s' % res.concretetype)
MuT = iref.concretetype.TO
assert fldname in MuT._names
......@@ -2265,9 +2265,9 @@ class LL2MuMapper:
def gen_mu_load(self, ref, res=None, memord='NOT_ATOMIC'):
assert isinstance(ref.concretetype, mutype.MuObjectRef)
log.info('gen_mu_load.ref = %s' % ref.concretetype)
if res:
log.info('gen_mu_load.res = %s' % res.concretetype)
# log.info('gen_mu_load.ref = %s' % ref.concretetype)
# if res:
# log.info('gen_mu_load.res = %s' % res.concretetype)
if res:
# RTMU - set result type for rtmu uptr cases
if isinstance(ref.concretetype.TO, mutype.MuObjectRef) and \
......@@ -2292,9 +2292,9 @@ class LL2MuMapper:
isinstance(val_vc.concretetype, mutype.MuObjectRef):
val_vc.concretetype = ref.concretetype.TO
log.info('gen_mu_store.val_vc.concretetype = %s' % val_vc.concretetype)
log.info('gen_mu_store.ref.concretetype = %s' % ref.concretetype)
log.info('gen_mu_store.ref.concretetype.TO = %s' % ref.concretetype.TO)
# log.info('gen_mu_store.val_vc.concretetype = %s' % val_vc.concretetype)
# log.info('gen_mu_store.ref.concretetype = %s' % ref.concretetype)
# log.info('gen_mu_store.ref.concretetype.TO = %s' % ref.concretetype.TO)
try:
assert val_vc.concretetype == ref.concretetype.TO
......
......@@ -173,7 +173,7 @@ class MuTyper:
# specialise inputargs
blk.inputargs = [self.specialise_arg(arg) for arg in blk.inputargs]
log.info('specialize_block.args: %s' % blk.inputargs)
# log.info('specialize_block.args: %s' % blk.inputargs)
if blk.operations:
try:
log.info('specialize_block.operations: %s' % blk.operations)
......
......@@ -141,8 +141,8 @@ class TranslationContext(object):
def buildflowgraph(self, func, mute_dot=False):
"""Get the flow graph for a function."""
log.info("buildflowgraph for func: %s" % func.__str__())
log.info("buildflowgraph for func: %s" % func.func_name)
# log.info("buildflowgraph for func: %s" % func.__str__())
# log.info("buildflowgraph for func: %s" % func.func_name)
if not isinstance(func, types.FunctionType):
raise TypeError("buildflowgraph() expects a function, "
"got %r" % (func,))
......@@ -155,7 +155,7 @@ class TranslationContext(object):
func_orig = self.deepcopy_func(func, '_copy')
graph = build_flow(func)
simplify.simplify_graph(graph)
log.info('buildflow for graph: %s' % graph.name)
# log.info('buildflow for graph: %s' % graph.name)
_num_of_copies = self.get_num_of_copies(graph)
# log.info('num of copies: %d' % _num_of_copies)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment