On 11/18/2010 02:59 PM, Josef Weidendorfer wrote:
> With instrumentation on, you still can decide not to aggregate events in given
> threads by switching the collection state on/off with 
> CALLGRIND_TOGGLE_COLLECT.
> The collection state is thread specific.

Okay great, that clarifies a lot for me. I just use --collect-atstart=no
and then use CALLGRIND_TOGGLE_COLLECT where needed.

Is specifying --toggle-collect=function the same as putting a toggle at
the entry and exit of that function?

> The big difference between instrumentation and collection state is the 
> following:
> if instrumentation is switched off, the state of the cache is not updated. 
> Thus,
> after switching instrumentation state on, callgrind starts with a freshly 
> initialized
> cache, ie. you will get a lot of cold misses. This would not happen in 
> reality, as

How are the misses calculated into the costs of the functions? Will it
make a substantial difference?  In the code I'm profiling I'd imagine
under normal use it should be nearing 0% cache misses.

> The option to switch instrumentation mode is only useful for "fast 
> forwarding" over
> uninteresting, large parts of the code, where you want all threads to 
> progress fast.

The basic reason why I wanted to do this was because I have a couple
threads that aren't of interest but consume the vast majority of CPU
cycles. So when I run valgrind I'll get something like 150M events, only
about 10M of which are of interest.  I was trying to get it to go faster.

-- 
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

        BigTPoker - Poker fun and games

                http://BigTPoker.com/
        
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to