> On Feb. 5, 2013, 3:12 p.m., Nathan Binkert wrote: > > src/python/m5/stats/info.py, line 633 > > <http://reviews.gem5.org/r/1677/diff/1/?file=33681#file33681line633> > > > > Seems like you should save these so you don't have to recalculate them, > > no? > > > > You can also do > > except (ZeroDivisionError, ValueError): > > > >
You are correct. Changed. - Sascha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/1677/#review3990 ----------------------------------------------------------- On April 24, 2013, 3:21 a.m., Andreas Hansson wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/1677/ > ----------------------------------------------------------- > > (Updated April 24, 2013, 3:21 a.m.) > > > Review request for Default. > > > Description > ------- > > Changeset 9706:c874d053e378 > --------------------------- > stats: Add total calculation to python formula class > > This patch adds total calculation to the formula class. This is done > by using puthon's AST module, which allows custom syntax trees to be > built. The original formula is taken, and the total is added to the > formula by manipulating the syntax tree. The tree is then evaluated to > get the total for the formula. In the event that python is unable to > evaluate the tree, NaN is returned. > > As ScalarValues are treated as floats by eval, we need to extend the > total function to simply return the stat as is. > > > Diffs > ----- > > src/python/m5/stats/info.py PRE-CREATION > > Diff: http://reviews.gem5.org/r/1677/diff/ > > > Testing > ------- > > > Thanks, > > Andreas Hansson > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
