|
From: Ganssauge, G. <Got...@ha...> - 2007-01-10 09:32:21
|
Hi everybody, I'm using callgrind to find performance bottlenecks in our indexing software - with very good success indeed! This morning I found some behaviour I cannot explain. Yesterday morning I profiled some component which yielded an overall instruction count of ca. 195,000,000,000. Then I modified an internally used algorithm based on this measurement and the resulting program ran about 20% faster. But the profile I generated this night (using the same input data) doesn't match this 20% improvement but showed an increase in instruction count to ca. 955,000,000,000 instructions - about 5 times the original count. Are instruction counts somehow bounded to 1,000,000,000,000? Then the first count could have wrapped around and be 1,195,000,000,000 instead. This would about match the 20% improvement measured by running the program. But if I view the profile with kcachegrind there are call counts which are absolutely amazing: The key routine I'm trying to improve is called 3011 times - in both profiles. But in the old profile two library routines called by my key routine have call counts of ca. 11,000,000 times whereas in the new profile those same two library functions are claimed to be called more than 4,300,000,000 each which cannot be explained by some wrap around at 1,000,000,000,000 ... Does anyone have ideas what I'm doing wrong? Cheers, Gottfried=20 P.S.: I already tried to reduce the problem size to some more managable size (It's about 4GB now) - with no luck so far. |
|
From: Josef W. <Jos...@gm...> - 2007-01-10 09:57:12
|
Hi, On Wednesday 10 January 2007 10:32, Ganssauge, Gottfried wrote: > Hi everybody, > > I'm using callgrind to find performance bottlenecks in our indexing > software - with very good success indeed! > This morning I found some behaviour I cannot explain. > Yesterday morning I profiled some component which yielded an overall > instruction count of ca. 195,000,000,000. > Then I modified an internally used algorithm based on this measurement > and the resulting program ran about 20% faster. > But the profile I generated this night (using the same input data) > doesn't match this 20% improvement but showed an increase in instruction > count to ca. 955,000,000,000 instructions - about 5 times the original > count. In general, the instruction count has nothing to do with the time spent. If you had a bad cache behavior before, and that was improved a lot, even a 5-times fold could be correct. However, it _sounds_ strange. Perhaps there is a bug somewhere. > Are instruction counts somehow bounded to 1,000,000,000,000? All counters in callgrind internally are 64bit values, so this should not happen. > Then the > first count could have wrapped around and be 1,195,000,000,000 instead. > This would about match the 20% improvement measured by running the > program. > But if I view the profile with kcachegrind there are call counts which > are absolutely amazing: The key routine I'm trying to improve is called > 3011 times - in both profiles. > But in the old profile two library routines called by my key routine > have call counts of ca. 11,000,000 times whereas in the new profile > those same two library functions are claimed to be called more than > 4,300,000,000 each which cannot be explained by some wrap around at > 1,000,000,000,000 ... That is strange indead. It is possible that this is a bug in the postprocessing (ie. KCachegrind), and not in callgrind itself. Does the command line tool callgrind_annotate give you the same strange results? If you make yourself comfortable with the format of callgrind.out.* (see HTML manual of callgrind, or KCachegrind web site), you can check this. Or you could send me the profile data file in private (best: before and after). Josef > Does anyone have ideas what I'm doing wrong? > > Cheers, > > Gottfried > > P.S.: I already tried to reduce the problem size to some more managable > size (It's about 4GB now) - with no luck so far. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |