Dear Andreas,


Thanks for your reply. Could you please point to, where exactly is the part on "Instrumenting a Benchmark”?

Are you referring to the pdf handout page with this title?

Moreover, I have gone through several descriptions/documentations where m5ops have been suggested for such a task.

I have already used m5ops successfully in my code to achieve several traces of my interest, but I could not figure out how would they work for this specific task.


My recent effort, to do this task is as following:


int main()
{
    int i;
    int j = 10;
    m5_checkpoint(0,0);
    for( i = 0; i <= j; i ++ )
    {
       if( i == 5 )
       {
          continue;
       }
       printf("Hello %d\n", i );
    }
    m5_exit;
    return 0;
}


However, I have not been able to know which trace/stat file and which variable should I see to get my answer, after executing this code. 

Furthermore, this was a simple case, if we can really solve it. Considering a larger multi-threaded application with multiple instrumentation points it might be hectic to create checkpoints again and again.


Sorry, if my comprehension is wrong. 


Thanks.


--------- 원본 메일 ---------
보낸사람: Andreas Hansson <[email protected]>
받는사람 : gem5 users mailing list <[email protected]>
날짜: 2015년 11월 26일 목요일, 20시 46분 15초 +0900
제목: Re: [gem5-users] How to get number of clock cycles (gem5 ticks) forROI
Have a look at the tutorials, particularly the part on "Instrumenting a Benchmark”.


Andreas

From: gem5-users <[email protected]> on behalf of Tod <[email protected]>
Reply-To: gem5 users mailing list <[email protected]>
Date: Thursday, 26 November 2015 at 10:23
To: gem5-users <[email protected]>
Subject: [gem5-users] How to get number of clock cycles (gem5 ticks) for ROI

Hi,


I am interested to get the number of clock cycles (gem5 ticks) taken by a region of code in gem5 FS mode. 


For example, if the following is my code snippet:


int main()
{
    int i;
    int j = 10;
    pt.1
    for( i = 0; i <= j; i ++ )
    {
       if( i == 5 )
       {
          continue;
       }
       printf("Hello %d\n", i );
    }
    pt.2
    return 0;
}


How can I know the gem5 tick value at pt.1 (i.e. before entering ROI) and at pt.2 (i.e. after leaving ROI)?

OR

In other words, how many clock cycles will it take in ROI?


Thanks.

Regards-

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.
_______________________________________________
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

Reply via email to