"dev" <dev-boun...@openvswitch.org> wrote on 06/17/2016 06:10:32 PM:
> From: Nirapada Ghosh/San Jose/IBM@IBMUS > To: dev@openvswitch.org > Date: 06/17/2016 06:10 PM > Subject: [ovs-dev] [PATCH V10] Function tracer to trace all function calls > Sent by: "dev" <dev-boun...@openvswitch.org> > > From: Nirapada Ghosh <ngh...@us.ibm.com> > > 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. I wish this had a test case, but I still haven't thought of how to code it with one. I've run make check with this enabled and not and it looks to pass everything so ... Acked-by: Ryan Moats <rmo...@us.ibm.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev