Thanks for the input. I will send out a V2 implementing the suggested changes.
On Fri, Mar 14, 2014 at 1:33 PM, Ben Pfaff <b...@nicira.com> wrote: > On Thu, Mar 13, 2014 at 06:17:14PM -0700, Andy Zhou wrote: > > LOG_BACKTRACE() logs the back trace into the log file. I find it > > to be helpful when debugging unit tests. "backtrace.h" documents > > the usage. It is not being called directly in the code, but rather as > > a handy tool available when needed. > > > > Signed-off-by: Andy Zhou <az...@nicira.com> > > This looks useful. > > I think that LOG_BACKTRACE and log_backtrace() could be defined more > along the existing pattern with the *_at() functions like > poll_fd_wait() and poll_fd_wait_at(), so that we'd have something more > like this: > > void log_backtrace_at(const char *where); > #define log_backtrace() log_backtrace_at(SOURCE_LOCATOR) > > I think that log_backtrace() could internally grab the backtrace. I > mean, it isn't strictly necessary to do it in the caller, you just get > an extra entry at the top and that isn't normally a big deal. > > Do you think it's worthwhile to allow the backtrace user to specify a > message to include? >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev