stdlib: Add get_local_path() call to Looppoint resources
Due to a change introduced in https://github.com/gem5/gem5/pull/625, a gem5 resource will not download any external files until `get_local_path()` is called. In the construction of the Looppoint Resources this function was not called, the `local_path` variable was called directly. As such, an error occured. The downside of this fix is the Looppoint resources external files are downloaded when `obtain_resource` is called, thus the bandwidth savings introduced with https://github.com/gem5/gem5/pull/625 will not occur for Looppoint resources. However, https://github.com/gem5/gem5/issues/644 proposes a fix which would supercede the https://github.com/gem5/gem5/pull/625 solution. Change-Id: I52181382a03e492ec1cb58b01e71bc4820af9ccc
This commit is contained in:
@@ -578,7 +578,9 @@ class LooppointCsvResource(FileResource, LooppointCsvLoader):
|
||||
resource_version=resource_version,
|
||||
downloader=downloader,
|
||||
)
|
||||
LooppointCsvLoader.__init__(self, pinpoints_file=Path(local_path))
|
||||
LooppointCsvLoader.__init__(
|
||||
self, pinpoints_file=Path(self.get_local_path())
|
||||
)
|
||||
|
||||
def get_category_name(cls) -> str:
|
||||
return "LooppointCsvResource"
|
||||
@@ -606,7 +608,7 @@ class LooppointJsonResource(FileResource, LooppointJsonLoader):
|
||||
downloader=downloader,
|
||||
)
|
||||
LooppointJsonLoader.__init__(
|
||||
self, looppoint_file=local_path, region_id=region_id
|
||||
self, looppoint_file=self.get_local_path(), region_id=region_id
|
||||
)
|
||||
|
||||
def get_category_name(cls) -> str:
|
||||
|
||||
Reference in New Issue
Block a user