This commit is contained in:
Kovid Goyal 2020-01-16 19:41:55 +05:30
commit f5090c951a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -177,7 +177,8 @@ def setup_profiling(args):
exe = kitty_exe()
cg = '/tmp/kitty-profile.callgrind'
print('Post processing profile data for', exe, '...')
subprocess.call(['pprof', '--callgrind', exe, '/tmp/kitty-profile.log'], stdout=open(cg, 'wb'))
with open(cg, 'wb') as f:
subprocess.call(['pprof', '--callgrind', exe, '/tmp/kitty-profile.log'], stdout=f)
try:
subprocess.Popen(['kcachegrind', cg])
except FileNotFoundError: