Hi Wei,

Is your object a subclass of SimObject? If not, regStats will never be
called (or you have to get the parent/owning object to call it explicitly).

Andreas

On 18/12/2014 18:58, "Wei Shu via gem5-users" <[email protected]> wrote:

>Hi,
>
>First, hope this link will help you:
>
>http://gem5.org/Statistics
>
>Second, I also have some problem related to statistic printing.
>
>Here's my implementation:
>I wanna add a parameter in stats.txt file. This parameter is in a class
>that called by Ruby protocol, the system can successfully run some
>benchmarks but
>the stats.txt does not show the parameter.
>
>I register the scalar like this:
>
>in MyClass.hh
>
>         Stats::Scalar counter_A;
>         void regStats();
>
>in MyClass.cc
>
>MyClass::regStats() {
>
>counter_A
>        .name("counter_A")
>        .desc("A counter for testing")
>        ;
>}
>
>The code will cause this counter value changing which in the same class
>is:
>
>if (counter_A_new > counter_A.value()){
>    counter_A = counter_A_new;
>}
>
>Please let me know if I missed something.
>
>Thanks,
>
>Wei
>----- Original Message -----
>From: "Christian List via gem5-users" <[email protected]>
>To: [email protected]
>Sent: Thursday, December 18, 2014 6:56:26 AM
>Subject: [gem5-users] Printing All stats even if they are 0
>
>
>
>Hello again :)
>I am using Gem5 with the parsec Benchmarks. When I am using a small
>intervall for dumping, some stats are getting zero and will not be
>printet in the stat file.
>
>
>After some googling I found out, that there is a function named "prereq"
>which prevent stats from being printed out if some prerequired ones are
>0.
>But I dont find the correct line for the l2 stats. So I am not able to
>enable "full printing" of the system.l2.ReadReq_misses::total key for
>example.
>
>
>Is there a way to print generally all values, even if they are 0 ?
>
>
>Thanks in anticipation,
>Chris
>_______________________________________________
>gem5-users mailing list
>[email protected]
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>_______________________________________________
>gem5-users mailing list
>[email protected]
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No:  2548782

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to