Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/67491?usp=email )

 (

13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: stdlib: Change the default Looppoint JSON output to m5out
......................................................................

stdlib: Change the default Looppoint JSON output to m5out

Change-Id: I6ac9aa55dfd4a0250c487ae743a1f4ea0b1bc154
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67491
Reviewed-by: Bobby Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
---
M src/python/gem5/utils/looppoint.py
1 file changed, 20 insertions(+), 3 deletions(-)

Approvals:
  Bobby Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/gem5/utils/looppoint.py b/src/python/gem5/utils/looppoint.py
index b681e75..d1851a8 100644
--- a/src/python/gem5/utils/looppoint.py
+++ b/src/python/gem5/utils/looppoint.py
@@ -34,6 +34,8 @@
 import csv
 import re
 import json
+import m5
+import os


 class LoopPoint:
@@ -106,14 +108,16 @@
self._json_file[rid]["simulation"]["end"]["relative"] = int(temp)

     def output_json_file(
-        self, input_indent: int = 4, filename: str = "outdir.json"
+        self,
+        input_indent: int = 4,
+        filepath: str = os.path.join(m5.options.outdir, "outdir.json"),
     ) -> Dict[int, Dict]:
         """
         This function is used to output the _json_file into a json file
         :param input_indent: the indent value of the json file
-        :param filename: the name of the output file
+        :param filepath: the path of the output file
         """
-        with open(filename, "w") as file:
+        with open(filepath, "w") as file:
             json.dump(self._json_file, file, indent=input_indent)

     def get_current_region(self) -> int:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/67491?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: I6ac9aa55dfd4a0250c487ae743a1f4ea0b1bc154
Gerrit-Change-Number: 67491
Gerrit-PatchSet: 15
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@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

Reply via email to