----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/2164/#review4946 -----------------------------------------------------------
Ship it! Too bad "assert_if" doesn't actually make sense, as it would be a nice parallel. Can't say I really like the name "chatty_assert", but I don't have a better alternative. I'll encourage others to suggest some though. If we can't come up with something, though, I'm fine with this as it is. Thanks for all the iterations! - Steve Reinhardt On March 6, 2014, 7:25 a.m., Andreas Hansson wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/2164/ > ----------------------------------------------------------- > > (Updated March 6, 2014, 7:25 a.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 10104:4d3c10cadce3 > --------------------------- > misc: Add panic_if / fatal_if / chatty_assert > > This snippet can be used to replace if + {panics, fatals, asserts} constructs. > The idea is to have both the condition checking and a verbose printout in a > single statement. The interface is as follows: > > panic_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar); > fatal_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar); > chatty_assert(foo == bar, "These should be equal: foo %i bar %i", foo, bar); > > > Diffs > ----- > > src/base/misc.hh 24cfe67c0749 > > Diff: http://reviews.gem5.org/r/2164/diff/ > > > Testing > ------- > > All regressions pass (as it does not affect existing code). > > > Thanks, > > Andreas Hansson > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
