##// END OF EJS Templates
statprof: fix overflow while skipping boilerplate parts...
Yuya Nishihara -
r40421:cc458674 default
parent child Browse files
Show More
@@ -257,6 +257,9 b' class CodeSite(object):'
257 257 def filename(self):
258 258 return os.path.basename(self.path)
259 259
260 def skipname(self):
261 return r'%s:%s' % (self.filename(), self.function)
262
260 263 class Sample(object):
261 264 __slots__ = (u'stack', u'time')
262 265
@@ -661,10 +664,8 b' def display_hotpath(data, fp, limit=0.05'
661 664 if len(stack) > 1:
662 665 i = 1
663 666 # Skip boiler plate parts of the stack
664 name = r'%s:%s' % (stack[i].filename(), stack[i].function)
665 while i < len(stack) and name in skips:
667 while i < len(stack) and stack[i].skipname() in skips:
666 668 i += 1
667 name = r'%s:%s' % (stack[i].filename(), stack[i].function)
668 669 if i < len(stack):
669 670 child.add(stack[i:], time)
670 671
General Comments 0
You need to be logged in to leave comments. Login now