Add JSON output to MemoryAnalysis plugin#21
Closed
coleramos425 wants to merge 12 commits intomainfrom
Closed
Conversation
mawad-amd
reviewed
May 21, 2025
…to memory_analysis_handler, write output file on completion Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
…ration Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
…ding The wrapped class memory_analysis_handler_t has a default deconstructor that should be called. Otherwise, the JsonOutputManger is destroyed prematurely when the library is unloaded, and then a new empty instance us being created inadvertently. Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
…o dh_comms to avoid additional dependency Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
3fc34f8 to
a2ed5c3
Compare
Signed-off-by: coleramos425 <colramos@amd.com>
mawad-amd
reviewed
May 28, 2025
…in a single object Signed-off-by: coleramos425 <colramos@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>
Collaborator
Author
|
Closing this (outdated) PR in favor of an improved implementation that logs JSON inside of the memory analysis handler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR closes #10 by setting a standard JSON output schema for the Memory Analysis plugin. To start, I'm just supporting the Memory Analysis, but the goal is to create a generalized
JsonOutputManager(living in dh_comms) that can be modified to fit other Omniprobe plugins.This PR is in two parts: (1) this PR to logduration, (2) the
JsonOutputManagerimplementation to dh_comms(AMDResearch/dh_comms#14). Main changes include:-v/--verboseflagmemory_analysis_output/memory_analysis_<dispatch-id>.jsonfile to CWD where omniprobe command is ran afterreport()completesJsonOutputManagerwhich is initialized as an empty json struct, and is included inmemory_analysis_handler.cppsuch that onreport()'s calls toreport_bank_conflict()andreport_cache_line_use()updates the json instance.** You'll see there's quite a bit of cout debugging that I've left in the code, @rwvo I left that there for your benefit while reviewing. Once you're happy, I'll remove that
Example
Details
Questions for reviewers
metadatafield which holds useful debug information such as timestamp and version. Ideally, I'd like to introduce aVERSIONfile at project root that we can use to dynamically populate fields like this throughout the project. However, having several components, it's unclear to be which project'sVERSIONwe are to report here. Any outside perspective?