"dev" <[email protected]> wrote on 06/15/2016 11:54:05 AM:
> From: Nirapada Ghosh/San Jose/IBM@IBMUS > To: [email protected] > Date: 06/15/2016 11:54 AM > Subject: [ovs-dev] [PATCH V7] Function tracer to trace all function calls > Sent by: "dev" <[email protected]> > > From: Nirapada Ghosh <[email protected]> > > In some circumstances, we might need to figure out where in > code, the CPU time is being spent most, so as to pinpoint > the bottleneck and thereby resolve it with proper changes. > Using '-finstrument-functions' flag, that can be achieved, and > this patch exactly does that. > > There is a python file [generate_ft_report.py] with the patch, > that may be used to convert this trace output to a human readable > format with symbol names instead of address and their execution > times. This tool uses addr2line that expects the executable to > be built with -g flag. > > To enable this feature, ovs needs needs to be configured with > "--enable-ft" command line argument [i.e. configure --enable-ft] > > This instrumentation logs the tracing output in separate log files > namely func_trace_<pid>.log. It does not use VLOG mechanism for > logging as that will make the patch very complicated to avoid > recursion in the trace routine. > > This feature starts dumping output, only in debug mode, which means > ovs-appctl -t <module> vlog/set any:any:dbg should be used to enable > this logging. > > Currently, only ovn-northd, ovn-controller, vswitchd are instrumented. > > It is intended to be used for debugging purposes. > Signed-off-by: Nirapada Ghosh <[email protected]> > > --- This needs more work, both in terms of the dependency on pkg-config (which IIRC is OS specific) and the potential infinite recursion loop when the feature is turned on... Ryan _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
