-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3819/#review9454
-----------------------------------------------------------

Ship it!


Ship It!

- Jason Lowe-Power


On Feb. 22, 2017, 10:02 a.m., Andreas Sandberg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3819/
> -----------------------------------------------------------
> 
> (Updated Feb. 22, 2017, 10:02 a.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 11873:97acd467f793
> ---------------------------
> python: Add a generalized mechanism to configure stats
> 
> Add a mechanism to configure the stat output format using a URL-like
> syntax. This makes it possible to specify both an output format
> (currently, only text is supported) and override default
> parameters.
> 
> On the Python-side, this is implemented using a helper function
> (m5.stats.addStatVisitor) that adds a visitor to the list of active
> stat visitors. The helper function parses a URL-like stat
> specification to determine the stat output type. Optional parameters
> can be specified to change how stat visitors behave.
> 
> For example, to output stats in text format without stat descriptions:
> 
>     m5.stats.addStatVisitor("text://stats.txt?desc=False")
> 
> From the command line:
> 
>     gem5.opt --stats-file="text://stats.txt?desc=False"
> 
> Internally, the stat framework uses the _url_factory decorator
> to wrap a Python function with the fn(path, **kwargs) signature in a
> function that takes a parsed URL as its only argument. The path and
> keyword arguments are automatically derived from the URL in the
> wrapper function.
> 
> New output formats can be registered in the m5.stats.factories
> dictionary. This dictionary contains a mapping between format names
> (URL schemes) and factory methods.
> 
> To retain backwards compatibility, the code automatically assumes that
> the user wants text output if no format has been specified (i.e., when
> specifying a plain path).
> 
> Change-Id: Ic4dce93ab4ead07ffdf71e55a22ba0ae5a143061
> Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
> Reviewed-by: Curtis Dunham <curtis.dun...@arm.com>
> Reviewed-by: Sascha Bischoff <sascha.bisch...@arm.com>
> Reviewed-by: Ilias Vougioukas <ilias.vougiou...@arm.com>
> 
> 
> Diffs
> -----
> 
>   src/python/m5/main.py ba90ffa751b6 
>   src/python/m5/stats/__init__.py ba90ffa751b6 
> 
> Diff: http://reviews.gem5.org/r/3819/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andreas Sandberg
> 
>

_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to