"dev" <dev-boun...@openvswitch.org> wrote on 08/05/2016 10:51:38 PM:

> From: Nirapada Ghosh/San Jose/IBM@IBMUS
> To: dev@openvswitch.org
> Date: 08/05/2016 10:52 PM
> Subject: [ovs-dev] [PATCH V14] 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 to be configured with
> "--enable-ft" command line argument [i.e. configure --enable-ft]
>
> This feature logs the tracing output to log files,
> that is set using "ovs-appctl vlog/trace <filename>" command.
> "ovs-appctl vlog/trace off" turns the logging off.
>
> The feature uses the hooks GNU-C provides when compiled with
> -finstrument-functions flag, we just have to implement
> them. What it means is, once you compile the code with --enable-ft
> option, function calls are going to be routed to the tracing routine
> anyways. In other words, even if we do disable tracing, the extra calls
would
> be happening though with very less CPU overhead, because the calls
> would return right away. The initialization call [ constructor ] happens
> even before main() is invoked, so no chance of completely disabling
> tracing when configured with --enable-ft. So, unless you intend on
debugging
> a module in OVS, this option would better be turned off by default.
>
> It is intended to be used for debugging purposes only.
>
> Signed-off-by: Nirapada Ghosh <ngh...@us.ibm.com>
> ---

Ben, as an FYI, I've delegated this patch to myself in
patchworks.  I'll pass it along once I'm done (assuming
that I'm happy)...
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to