[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Some tips on profiling

From: Stefan Fuhrmann <stefanfuhrmann_at_alice-dsl.de>
Date: Mon, 27 Sep 2010 22:29:33 +0200

  On 27.09.2010 21:44, Ramkumar Ramachandra wrote:
> Hi Stefan,
>
> Could you tell me which tools you use to profile the various
> applications in trunk? I'm looking to profile svnrdump to fix some
> perf issues, but OProfile doesn't seem to work for me.
>
> Thanks.
>
> -- Ram

Hi Ram,

Under Linux, I'm using Valgrind / Callgrind and visualize in KCachegrind.
That gives me a good idea of what code gets executed too often, how
often a jump (loop or condition) has been taken etc. It will not show the
non-user and non-CPU runtime, e.g. wait for disk I/O. And it will slow the
execution be a factor of 100 (YMMV).

Under Windows, I'm using the VisualStudio sampling profiler. The
measurements
are pretty accurate and the overhead is low. It does not tell me, how often
a certain code path has been executed. Due to the low overhead, it is
well-suited for long running (>1 min) operations.

Also, I find a simple "time <command>" very useful to get a first impression
whether my code is bound by user-runtime, I/O wait or system runtime.

To collect data on I/O activity, compression rates and other not readily
available information, I use simple static counters and printf() their
values
at the end of each client call, for instance.

Hope that helps.

-- Stefan^2.
Received on 2010-09-27 22:30:36 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.