From: Josef W. <Jos...@gm...> - 2013-03-26 13:26:59
|
Hi, Am 26.03.2013 13:54, schrieb Farah Saab Gmail: > I am using callgrind tool of valgrind to profile my running code. > Then I am using kcachegrind to view the output. The problem is that my > native code is already slow as it is. So running it through valgrind is > making it even more slow. According to my calculations, to run the code > just once through valgrind it needs more than 2 weeks. > The only output that I care about is the machine code. I only care about > getting the total number of instructions that are being performed while > my program is running. > So is there a way to make valgrind run a bit faster if we take into > consideration that the only thing I need is the machine instruction > count??? What exactly are you interested in? If you just want the instruction count for the whole run (why?), I really would suggest to use hardware performance counters with the corresponding event (e.g. on Linux use "perf stat" for that). If you need the callgraph feature of callgrind, the only thing possible is to skip any initialization using "--instr-atstart=no" (which also does not count anything for the skipped part). Otherwise, cachegrind with --cache-sim=no may be enough. It still gives you instruction counts (self cost) per source line of your code, and is a lot faster than callgrind. Josef > > Thanks, > Farah > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |