def debugDump(self, name): # Dump output directory = 'summaries\\dataflow' # Dump information about ops f = filesystem.fileOutput(directory, name + '-ops', 'html') out = XMLOutput(f) with out.scope('html'): with out.scope('head'): with out.scope('title'): out.write(name) out.endl() with out.scope('body'): for op in self.order: if isinstance(op, (graph.Merge, graph.Split)): continue out.tag('hr') out.endl() out.write(op) out.endl() mask = self.opMask(op) if mask is not self.bool.true: with out.scope('p'): out.write(mask) if self.opReads[op] is not self.set.empty: self.dumpTitle(out, 'Read') self.dumpMasked(out, self.opReads[op], mask) if self.opModifies[op] is not self.set.empty: self.dumpTitle(out, 'Modify') self.dumpMasked(out, self.opModifies[op], mask) if self.opAllocates[op] is not self.set.empty: self.dumpTitle(out, 'Allocates') self.dumpMasked(out, self.opAllocates[op], mask) self.dumpNodes(out, 'Inputs', op.reverse(), mask) self.dumpNodes(out, 'Outputs', op.forward(), mask) out.endl() f.close() # Dump information about memory f = filesystem.fileOutput(directory, name + '-memory', 'html') out = XMLOutput(f) with out.scope('html'): with out.scope('head'): with out.scope('title'): out.write(name) out.endl() with out.scope('body'): for key, mask in self.objectExistanceMask.iteritems(): with out.scope('p'): assert isinstance(key, tuple), key obj, index = key out.write(obj) out.write(' - ') out.write(index) out.tag('br') out.write('preexisting' if self.objectIsPreexisting( obj, index) else 'allocated') out.tag('br') out.write(mask) out.endl() f.close()
def debugDump(self, name): # Dump output directory = 'summaries\\dataflow' # Dump information about ops f = filesystem.fileOutput(directory, name+'-ops', 'html') out = XMLOutput(f) with out.scope('html'): with out.scope('head'): with out.scope('title'): out.write(name) out.endl() with out.scope('body'): for op in self.order: if isinstance(op, (graph.Merge, graph.Split)): continue out.tag('hr') out.endl() out.write(op) out.endl() mask = self.opMask(op) if mask is not self.bool.true: with out.scope('p'): out.write(mask) if self.opReads[op] is not self.set.empty: self.dumpTitle(out, 'Read') self.dumpMasked(out, self.opReads[op], mask) if self.opModifies[op] is not self.set.empty: self.dumpTitle(out, 'Modify') self.dumpMasked(out, self.opModifies[op], mask) if self.opAllocates[op] is not self.set.empty: self.dumpTitle(out, 'Allocates') self.dumpMasked(out, self.opAllocates[op], mask) self.dumpNodes(out, 'Inputs', op.reverse(), mask) self.dumpNodes(out, 'Outputs', op.forward(), mask) out.endl() f.close() # Dump information about memory f = filesystem.fileOutput(directory, name+'-memory', 'html') out = XMLOutput(f) with out.scope('html'): with out.scope('head'): with out.scope('title'): out.write(name) out.endl() with out.scope('body'): for key, mask in self.objectExistanceMask.iteritems(): with out.scope('p'): assert isinstance(key, tuple), key obj, index = key out.write(obj) out.write(' - ') out.write(index) out.tag('br') out.write('preexisting' if self.objectIsPreexisting(obj, index) else 'allocated') out.tag('br') out.write(mask) out.endl() f.close()