diff --git a/mercurial/statprof.py b/mercurial/statprof.py --- a/mercurial/statprof.py +++ b/mercurial/statprof.py @@ -664,6 +664,7 @@ name = r'%s:%s' % (stack[i].filename(), stack[i].function) while i < len(stack) and name in skips: i += 1 + name = r'%s:%s' % (stack[i].filename(), stack[i].function) if i < len(stack): child.add(stack[i:], time) diff --git a/tests/test-profile.t b/tests/test-profile.t --- a/tests/test-profile.t +++ b/tests/test-profile.t @@ -89,6 +89,8 @@ $ hg --profile --config profiling.statformat=byline sleep 2>../out $ head -n 3 ../out % cumulative self + time seconds seconds name + * sleepext.py:*:sleep (glob) $ cat ../out | statprofran $ hg --profile --config profiling.statformat=bymethod sleep 2>../out