[ovs-dev] [PATCH 2/2] timeval: Add new "backtrace" appctl command.

Ben Pfaff blp at nicira.com
Sun Oct 14 17:01:04 UTC 2012


On Fri, Oct 12, 2012 at 07:40:23PM -0700, Ethan Jackson wrote:
> Often, it can be quite difficult to debug performance issues in
> Open vSwitch.  Typically one needs to run something like gprof, but
> that requires rebuilding and installing on the affected system
> which is often problematic.  This patch adds a light weight
> profiling solution which can be used in these situations.  The
> ovs-appctl backtrace command prints out backtraces taken at 100
> millisecond intervals over a 5 second period of time.  It is
> currently only supported on systems which have the execinfo library
> and enable time caching.
> 
> Signed-off-by: Ethan Jackson <ethan at nicira.com>

This seems pretty good.

We can't safely call [x]malloc() from a signal handler.  It's safer to
preallocate the backtraces.



More information about the dev mailing list