Zhantong Qiu has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/64151?usp=email )
Change subject: stdlib: added errout and output file option in SE process
......................................................................
stdlib: added errout and output file option in SE process
In the set_se_binary_workload(), added stdout_file and stderr_file
arguments to setup process.errout and process.output.
Change-Id: I54db2248578f485a633d6b6212fa6c62bcbca4de
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64151
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Bobby Bruce <bbr...@ucdavis.edu>
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
---
M src/python/gem5/components/boards/se_binary_workload.py
1 file changed, 23 insertions(+), 0 deletions(-)
Approvals:
Bobby Bruce: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/python/gem5/components/boards/se_binary_workload.py
b/src/python/gem5/components/boards/se_binary_workload.py
index 62837fd..afd7cef 100644
--- a/src/python/gem5/components/boards/se_binary_workload.py
+++ b/src/python/gem5/components/boards/se_binary_workload.py
@@ -32,6 +32,7 @@
from typing import Optional, List
from m5.util import warn
+from pathlib import Path
class SEBinaryWorkload:
@@ -53,6 +54,8 @@
binary: AbstractResource,
exit_on_work_items: bool = True,
stdin_file: Optional[AbstractResource] = None,
+ stdout_file: Optional[Path] = None,
+ stderr_file: Optional[Path] = None,
arguments: List[str] = [],
simpoint: SimPoint = None,
) -> None:
@@ -91,6 +94,10 @@
process.cmd = [binary_path] + arguments
if stdin_file is not None:
process.input = stdin_file.get_local_path()
+ if stdout_file is not None:
+ process.output = stdout_file.as_posix()
+ if stderr_file is not None:
+ process.errout = stderr_file.as_posix()
for core in self.get_processor().get_cores():
core.set_workload(process)
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/64151?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: I54db2248578f485a633d6b6212fa6c62bcbca4de
Gerrit-Change-Number: 64151
Gerrit-PatchSet: 3
Gerrit-Owner: Zhantong Qiu <zt...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Zhantong Qiu <zt...@ucdavis.edu>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org