Hi,

I have created a stat of type Value called zeroBytesPercentage. It is the
percentage of zero bytes of all the lines that are written in the LLC. I
want it to get a value from a function (calcZeroBytesPercentage), so I'm
using functor.

zeroBytesPercentage
        .functor(calcZeroBytesPercentage)
        .flags(total)
        .precision(3)
        ;

Throughout the program execution I'm populating a vector called totalLines,
which I've declared as public in BaseCache. This vector stores all the
cache lines that are written to the LLC during the execution of the program.

My problem is that the function is not static and that it uses non-static
variables (the totalLines vector). I've tried having the function as a
member of either BaseCache or BaseCache::CacheStats, but either way I'm
getting errors about the use of non-static data members.

How can I do this calculation at the end of the execution and be able to
access variables that are non-static?
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to