Am 12.02.2014 14:52, schrieb Dallman, John:
> I'm looking at using callgrind to replace an expensive Windows coverage tool,
> and for some other work where the ideas are only part-formed.
> 
> The default callgrind run and callgrind_annonate display shows Ir events, but
> I only need to count function entries. Is there a way to only collect those
> and have callgrind run faster??

As Julian said, it does not get faster by not collecting Ir events, as
without cache simulation, callgrind only counts how often basic blocks
where executed.
The important task of callgrind is to increment counters for
(caller site/called function) tuples, to build the call graph.
This often involves hash table lookups.

If you are only interested in call counts of functions, a specific tool
for that may be a lot faster: just increment a counter whenever a basic
block is executed that represents a function entry.

> callgrind_annotate has the --show option to only show specific events, but I
> can't find a list of event names to feed it. Where should I be looking?

Julian is right: callgrind_annotate just takes it from the callgrind
output. Events for "--show" are events that always can be related to
some code. In contrast to that, call counts relate to (from,to) tuples
of code positions, and are handled special: they have no specific name.

E.g. do a grep for "Ir" in the callgrind directory, and you will
see the string "Ir" in sim.c. Depending on the mode callgrind is
running in, different sets of event names are registered.

Josef

> To explain a bit, the reason I only need function entries is that we collect
> coverage data on a per-function basis, for all our test cases, and then use
> that to discover which test cases we need to run for changes to a given set
> of functions.
> 
> The other task consists of trying to find the most-called functions, because
> on a different platform, I am having to use a compiler option that adds a
> small constant overhead to some, but not all, functions. If I can discover
> the most-called functions, I can then find out if they are having the overhead
> added by the compiler, and then try to revise them so that the compiler no
> longer needs to do that.
> 
> thanks,
> 
> --
> John Dallman
> 
> -----------------
> Siemens Industry Software Limited is a limited company registered in England 
> and Wales.
> Registered number: 3476850.
> Registered office: Faraday House, Sir William Siemens Square, Frimley, 
> Surrey, GU16 8QD.
> 
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Valgrind-users mailing list
> Valgrind-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
> 


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to