Running GPROF on Samba

Andrew Bartlett abartlet at samba.org
Sun Mar 1 11:22:09 MST 2015


On Sun, 2015-03-01 at 16:21 +0000, Richard Schmitt wrote:
> I've seen some old discussion on profiling but nothing recent.  Is
> there a procedure for running gprof on Samba?  I've added the
> appropriate flags to the Makefiles and do get a gmon.out file but I
> suspect my issue is that I am not cleanly shutting down Samba when I
> wish to collect the profile data.  Is there a way to cleanly shut down
> Samba?  Or are there some other suggestions on how to collect gprof
> data on smbd.
> 
> What I really want to get is a call graph when running various
> benchmarks.

I've been trying to get good gcov (different, but similar) data out of
Samba for a while.  You can see what we do for that in our build farm
scripts (in git).  I tried hard to make our test environment stop our
server cleanly, but still I see output that suggests 'make test' never
ran code I'm pretty sure really is run.

In the profiling space, I've had pretty good luck with the Linux perf
tools, and these do not need compile-time instrumentation. 

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list