You probably want a Stats::Value and set the functor() to a function that returns the stat. That functor will be called when the stats are dumped.
Ali On 24.08.2012 19:29, Min Kyu Jeong wrote: > Hi, > > I am running a gem5 with some external simulator glued to it. I would like to have a single stats.txt file that also has stats from the external simulator. > At first, I tried to pull the stats from the external simulator, and new Stat::Scalar()ed for each one of them, hoping that they register and print the values. It didn't work. > > After further digging, > > The python/m5/stats/__init__py has a comment says > > "def enable(): > '''Enable the statistics package. Before the statistics package is > enabled, all statistics must be created and initialized and once > the package is enabled, no more statistics can be created.''' > > == you can't add stats once the simulation starts. > > So now I plan to new Stat::Scalar() in the regStats() to register external simulator stats, then later update the value when the simulator ends. If anybody had done something like this, and had a better way to handle this situation, please share. > > Thanks, > > Min
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users