Running GPROF on Samba

Ralph Böhme rb at sernet.de
Mon Mar 2 03:58:01 MST 2015


On Mon, Mar 02, 2015 at 09:30:14PM +1100, Brad Hards wrote:
> On Mon, 2 Mar 2015 07:15:55 AM Ralph Böhme wrote:
> > > Can't help with gprof, but there's Flamegraph which can use output
> > > from perf:
> > > 
> > > <https://github.com/brendangregg/FlameGraph>
> > > <http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html>
> > 
> > fwiw, here's an example of briefly profiling a session smbd while the
> > client opened a directory with lots of files:
> > 
> > <https://www.samba.org/~slow/perf-smbd.svg>
>
> appears to be a heck-of-a-lot of read_hpet()...

yeah, not sure if that comes from clock_gettime() itself or is a side
effect of prof. The smbd process had profiling enabled at the
application level, ie "smbd profiling level = on" in smb.conf. That
calls clock_gettime() via profile_timestamp().

My understanding was, that both clock_gettime() and gettimeofday()
would use vDSO and thus avoid a syscall. The machine is a VM, I'm
currently re-runnnig the sample on bare metal as I've been told that
may play a role.

Cheerio!
-slow

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de


More information about the samba-technical mailing list