gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: stdlib: Small fix in stdlib spec2006 script The call to processor swi...

HJ
humza jahangir ikram (Gerrit)
Wed, Mar 29, 2023 9:15 AM

humza jahangir ikram has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/69357?usp=email )

Change subject: stdlib: Small fix in stdlib spec2006 script The call to
processor switch from KVM to TIMING was removed in an earlier commit. This
change fixes that. Also, get_roi_ticks() doesn't work because spec2006 does
not have work_begin and work_exit annotations. This change uses
get_tick_stopwatch() to calculate the roi ticks.
......................................................................

stdlib: Small fix in stdlib spec2006 script
The call to processor switch from KVM to TIMING was
removed in an earlier commit. This change fixes that.
Also, get_roi_ticks() doesn't work because spec2006
does not have work_begin and work_exit annotations.
This change uses get_tick_stopwatch() to calculate
the roi ticks.

Change-Id: I55efe28ebd686cb4e6c88a528533127fb73c88ed

M configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py
b/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py
index a681eca..e7a9e82 100644
--- a/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py
+++ b/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py
@@ -272,6 +272,7 @@
print("Done bootling Linux")
print("Resetting stats at the start of ROI!")
m5.stats.reset()

  • processor.switch()
    yield False  # E.g., continue the simulation.
    print("Dump stats at the end of the ROI!")
    m5.stats.dump()
    @@ -304,7 +305,11 @@

print("Performance statistics:")

-print("Simulated time: " + ((str(simulator.get_roi_ticks()[0]))))
+roi_begin_ticks = simulator.get_tick_stopwatch()[0][1]
+roi_end_ticks = simulator.get_tick_stopwatch()[0][1]
+
+print("roi simulated ticks: " + str(roi_end_ticks - roi_begin_ticks))
+
print(
"Ran a total of", simulator.get_current_tick() / 1e12, "simulated
seconds"
)

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69357?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I55efe28ebd686cb4e6c88a528533127fb73c88ed
Gerrit-Change-Number: 69357
Gerrit-PatchSet: 1
Gerrit-Owner: humza jahangir ikram humzajahangirikram@gmail.com
Gerrit-MessageType: newchange

humza jahangir ikram has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/69357?usp=email ) Change subject: stdlib: Small fix in stdlib spec2006 script The call to processor switch from KVM to TIMING was removed in an earlier commit. This change fixes that. Also, get_roi_ticks() doesn't work because spec2006 does not have work_begin and work_exit annotations. This change uses get_tick_stopwatch() to calculate the roi ticks. ...................................................................... stdlib: Small fix in stdlib spec2006 script The call to processor switch from KVM to TIMING was removed in an earlier commit. This change fixes that. Also, get_roi_ticks() doesn't work because spec2006 does not have work_begin and work_exit annotations. This change uses get_tick_stopwatch() to calculate the roi ticks. Change-Id: I55efe28ebd686cb4e6c88a528533127fb73c88ed --- M configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py b/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py index a681eca..e7a9e82 100644 --- a/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py +++ b/configs/example/gem5_library/x86-spec-cpu2006-benchmarks.py @@ -272,6 +272,7 @@ print("Done bootling Linux") print("Resetting stats at the start of ROI!") m5.stats.reset() + processor.switch() yield False # E.g., continue the simulation. print("Dump stats at the end of the ROI!") m5.stats.dump() @@ -304,7 +305,11 @@ print("Performance statistics:") -print("Simulated time: " + ((str(simulator.get_roi_ticks()[0])))) +roi_begin_ticks = simulator.get_tick_stopwatch()[0][1] +roi_end_ticks = simulator.get_tick_stopwatch()[0][1] + +print("roi simulated ticks: " + str(roi_end_ticks - roi_begin_ticks)) + print( "Ran a total of", simulator.get_current_tick() / 1e12, "simulated seconds" ) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69357?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I55efe28ebd686cb4e6c88a528533127fb73c88ed Gerrit-Change-Number: 69357 Gerrit-PatchSet: 1 Gerrit-Owner: humza jahangir ikram <humzajahangirikram@gmail.com> Gerrit-MessageType: newchange