Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drcachesim: initialization interface for analysis_tool_t #3106

Closed
snehasish opened this issue Jul 13, 2018 · 0 comments
Closed

drcachesim: initialization interface for analysis_tool_t #3106

snehasish opened this issue Jul 13, 2018 · 0 comments
Assignees

Comments

@snehasish
Copy link
Contributor

Analysis tools such as opcode_mix and view perform setup within the constructor which could fail with google internal APIs such as remote filesystems. For example, the view tool reads in the modules.log file using raw2trace_directory_t. Using a non local file path results in fatal error. To avoid similar issues we can have analysis_tool_t expose a virtual initialization method. They would be invoked by the analyzer_t after the tools have been constructed and before trace processing begins.

This issue covers

  • adding an initialization interface to analysis_tool_t
  • updating analyzer_t to invoke it for each analysis tool
  • moving relevant initialization code for each tool to the new interface
derekbruening added a commit that referenced this issue Dec 20, 2018
Adds a separate analysis_tool_t::initialize() method to better handle
tool initialization that can fail, separating it out from the
constructor.  This simplifies subclassing as well.

Updates the view_t and opcode_mix_t tools to move their module mapping
and other code into initialize().  Leaves updating the simulator tools
for future work.

Changes raw2trace_directory_t to return error strings instead of
aborting the process, and splits its constructor from new initialize()
and initialize_module_file() methods.

Fixes #3106
@derekbruening derekbruening self-assigned this Dec 20, 2018
derekbruening added a commit that referenced this issue Dec 21, 2018
Adds a separate analysis_tool_t::initialize() method to better handle
tool initialization that can fail, separating it out from the
constructor.  This simplifies subclassing as well.

Updates the view_t and opcode_mix_t tools to move their module mapping
and other code into initialize().  Leaves updating the simulator tools
for future work.

Changes raw2trace_directory_t to return error strings instead of
aborting the process, and splits its constructor from new initialize()
and initialize_module_file() methods.

Fixes #3106
derekbruening added a commit that referenced this issue Dec 21, 2018
Changes analysis_tool_t::initialize() to directly return an error
string, to simplify the interface.

Issue: #3106
derekbruening added a commit that referenced this issue Dec 21, 2018
Changes analysis_tool_t::initialize() to directly return an error
string, to simplify the interface.

Issue: #3106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants