> On 2012-01-04 15:57:35, Nathan Binkert wrote: > > Sorry to be pedantic. I just hate duplicated code. :) It's not so bad > > that I require the change and I don't need to review it again if you choose > > to make the changes I suggest. > > > > Finally, why do you want the pickle format? I ask because json might be > > more generally useful. basically replace pickle.dump with json.dump and > > then a lot more stuff could suck in the json. (Someone could build a > > pretty javascript thing with canvas for displaying the configuration :) > > Ali Saidi wrote: > I looked at it's actually pretty hard to get these into one change. In > theory config.ini could be created from it, so I'll think about that but no > promises. json doesn't work because right now there are types in the tree > that aren't json compatible (E.g. timestruct for rtc devices). > > Nathan Binkert wrote: > Can't you simply add a recurse parameter to get_dict? For children with > recurse, it will do it, for children without recurse, it will just output the > string. Reasonable?
Ok.. The time struct was the only place where the dict isn't json compatible. So it can be pickle or json. Any opinions? - Ali ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.m5sim.org/r/930/#review1823 ----------------------------------------------------------- On 2011-12-16 13:35:00, Ali Saidi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.m5sim.org/r/930/ > ----------------------------------------------------------- > > (Updated 2011-12-16 13:35:00) > > > Review request for Default. > > > Summary > ------- > > config: support outputing a pickle of the configuration tree > > This is useful as an input potential input to power models and visualization > tools. > > > Diffs > ----- > > src/python/m5/SimObject.py ca98021c3f96 > src/python/m5/main.py ca98021c3f96 > src/python/m5/params.py ca98021c3f96 > src/python/m5/simulate.py ca98021c3f96 > > Diff: http://reviews.m5sim.org/r/930/diff > > > Testing > ------- > > > Thanks, > > Ali > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
