[MERGE] Extend --lsprof-file to implicitly support files starting with callgrind.out
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 27 13:54:41 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Clatworthy wrote:
> Aaron has pointed out that KCacheGrind's Open Dialog filters by default
> on files starting with callgrind.out. This patch dumps data into the
> format expected by KCacheGrind when a profiling output filename with
> that pattern is passed to the --lsprof-file option.
>
> The relevant documentation in the various places is also updated by this
> patch.
>
> Ian C.
>
It seems like it would be better to detect the format in the same place as the
others.
So instead of doing this in commands.py, you should do it in lsprof.py
Something like:
if format is None:
if format.startswith('callgrind.out'):
format = callgrind
else:
ext = os.path.splitext(filename)[1]
if len(ext) > 1:
format = ext[1:]
If you are going to auto-detect the format, you should do it all at the same time.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGqerKJdeBCYSNAAMRAlAHAKChPYFIG1VY/ySM02pMN2pG6keRAQCfeIQv
SnU5VkZ9UtmDs9mFDL/9v5w=
=Ad/1
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list