Thanks so much for the info everyone!
So, by warm-up period, I mean the time before the actual benchmark starts
running. So based on the board.pc.com_1.device file, at some point we get
logs like this:
Setting Up Run Directories
  Setting up 502.gcc_r test base mytest-m64 (1 copy):
run_base_test_mytest-m64.0000
Running Benchmarks
  Running 502.gcc_r test base mytest-m64 (1 copy) [2023-04-03 15:46:58]

Starting from this "Running benchmarks" part, I want to limit the
instruction count to N, let's say. Basically, I want N number of
instructions of a benchmark to be executed.

Based on Humza's suggestion, I think if I add the tick count line after
processor.switch(), it would count the instructions for loading the
binaries, getting started, and other kinds of stuff, right? Do you have any
estimations on the number of ticks to be set to account for those parts?

Or Bobby, is it possible to use schedule_max_insts to only count the
instructions when the spec application starts running?

Best,
Farbin.

On Mon, Apr 10, 2023 at 9:51 PM Bobby Bruce <bbr...@ucdavis.edu> wrote:

> I don’t know exactly how you are figuring out the warm-up period and how
> this all this is to fit together but the following may be of help:
>
> If you’re using the gem5 standard library the “simulator” module has a
> function called “schedule_max_insts”. It will exit the simulation loop when
> any thread in any core reaches the specified number of instructions.
>
> If you're not using the standard library you can set the BaseCPU’s
> “max_insts_any_thread” parameter prior to the system’s initialization
> specify when to exit the simulation, or, if after initialization, BaseCPU’s
> “scheduleInstStopAnyThread” function can be used.
>
> --
> Dr. Bobby R. Bruce
> Room 3050,
> Kemper Hall, UC Davis
> Davis,
> CA, 95616
>
> web: https://www.bobbybruce.net
>
> On Apr 10, 2023, at 1:47 PM, Humza Ikram via gem5-users <
> gem5-users@gem5.org> wrote:
>
> Hi,
>
> I do not know how to stop execution after a certain number of instructions
> but perhaps stopping execution after a certain number of *ticks* will
> suffice? If that works, you could try using the
> "m5.scheduleTickExitFromCurrent" function available in
> src>python>m5>simulate.py.  You could call this function before
> "processor.switch()".
>
> You might also have to  append something like "ExitEvent.SCHEDULED_TICK:
> handle_exit()" to "ExitEvent.EXIT: handle_exit()," in line ~300 of the same
> file.
>
> Hope I helped!
> Humza Ikram
> ------------------------------
> *From:* Farbin Fayza via gem5-users <gem5-users@gem5.org>
> *Sent:* Tuesday, April 11, 2023 1:19 AM
> *To:* The gem5 Users mailing list <gem5-users@gem5.org>
> *Cc:* Farbin Fayza <ffa...@bu.edu>
> *Subject:* [gem5-users] Setting the maxinsts after warm-up period for
> running SPEC2017 in full-system mode
>
> Hello,
> Could anyone tell me how to set the max number of instructions to run
> after the warm-up period? I'm not sure how to make the relevant change in
> the x86-spec-cpu2017-benchmarks.py file. Or, is it possible to do this with
> command-line arguments?
>
> Thanks,
> Farbin.
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
>
>
>
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org

Reply via email to