|
From: Khan S. <Sub...@vt...> - 2009-10-20 05:41:55
|
Dear all, I just started to using valgrind. I want some guidance,...May be the mail is too long :-) My goal is to get the overall or cumulative impact of a set of functions in an application, I mean the overall %age of contribution of functions group to the total workload of application. In fact each one of these functions is a wrapper of a BSD socket API function. I have to profile streaming applications and the problem is that Kcachegrind does not show the contribution of BSD socket API functions , may be it is because valgrind does not go all the way down there.Is there any alternative to valgrind +Kcachegrind that could give nice graphs with relative costs of individual functions in the call tree BUT ALSO SUPPORTING SYSTEM CALLS (Socket API FUNCTIONS) ? I saw some profilers like Systemtap and Dtrace BUT, are they going to give me the load measures at this fine level of granularity, I got the impression after preliminary reading that it is not the case for systemtap atleast. Best Regards Subayal Aftab Khan ---------------------------------------- Subayal Aftab Khan Research Scientist, M.Sc. VTT Technical Research Centre of Finland P.O. BOX 1100, FI-90571 Oulu, Finland. Email : sub...@vt... Phone : +358(0)207222479 Mobile : +358(0)407063653 ---------------------------------------- |
|
From: Josef W. <Jos...@gm...> - 2009-10-20 08:30:07
|
On Tuesday 20 October 2009, Khan Subayal wrote: > Dear all, > > I just started to using valgrind. I want some guidance,...May be the > mail is too long :-) > > My goal is to get the overall or cumulative impact of a set of functions > in an > application, I mean the overall %age of contribution of functions group > to the > total workload of application. In fact each one of these functions is a > wrapper > of a BSD socket API function. > > I have to profile streaming applications and the problem is that > Kcachegrind does > not show the contribution of BSD socket API functions , may be it is > because valgrind does not go > all the way down there.Is there any alternative to valgrind +Kcachegrind Valgrind profiling tools only see what is happening inside the user level part of a process. I assume you want to see the impact of your socket I/O. This is not easy, as I/O requests usually are put into queues, and I/O happens asynchroneously while the CPU can do other things. The best bet is to use a systemwide sampling tool. For Linux e.g. OProfile or the the newer Perf Events infrastructure supported since 2.6.31. I have it on my TODO to write an import filter for perf.data in KCachegrind... but ASCII output given by "perf report" should do, too. Cheers, Josef |