[PATCH] tracedump: add --help and --function-histogram
Zack Rusin
zack at kde.org
Wed Oct 19 20:34:57 PDT 2011
On Wednesday, October 19, 2011 09:43:03 PM Carl Worth wrote:
> On Wed, 7 Sep 2011 16:40:55 +0100, José Fonseca <jose.r.fonseca at gmail.com>
wrote:
> > I envision "git style" CLI, i.e., "<tool> <command> <args> ...", e.g.:
> > apitrace dump foo.trace
> > apitrace stats foo.trace
> > apitrace reenc foo.trace
>
> I've started hacking on exactly this. The branch I have so far (with
> only "apitrace trace" and "apitrace help" so far) can be found at:
>
> http://git.cworth.org/git/apitrace
>
> and cloned from:
>
> git://git.cworth.org/git/apitrace
Ah, that's very cool.
> I'll be glad to accept any comments on what I have already. But I'll
> probably be cleaning things up a bit (incorporating "apitrace dump" and
> a new "apitrace trim") before I seriously propose this for inclusion.
>
> I have not made an effort to make things work on anything but Linux. I'm
> not really in a position to fix/test other operating systems, but I'll
> be glad to accept any patches or proposals to improve the portability.
I guess you probably broke the gui by changing the install paths of the
objects, that's not a biggie though. It'd be nice if like gui the tool would
prefer the built but not necessarily installed executables to the ones which
have been installed, otherwise it's not very developer friendly.
It doesn't seem like the talloc dependency is really necessary. We need to
bundle those things for other platforms and if its only use is to do
talloc_sprintf("%s/%s"...) rather than string fullpath = dir + "/" + name;
then lets just use the latter. BTW, you seem to really dislike c++ :) Using
string's, standard algorithms, not having to declare variables at the top of
the scope but close to where they're being used, not having to typedef
structs... are all very useful.
Also, while we're not very good at following a consistent style, most spots
use camel case for names with object names starting with uppercase, i.e.
Command instead command_t.
All of those are probably trivially fixable so I hope I don't sound too
negative because I think that a toplevel tool is a great idea!
z
More information about the apitrace
mailing list