-
Notifications
You must be signed in to change notification settings - Fork 49
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
Interface proposal : pull request 5 #57
Open
yoann-heitz
wants to merge
13
commits into
ROCm:rocm-4.3.x
Choose a base branch
from
dorsal-lab:rocm-4.3.x-PR5
base: rocm-4.3.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Deleted a line that makes rocprof abort when using fine grained control one several APIs at a time. The parsing function in libtracer_tool.so that parses the input XML file that specifies the functions for which the user wants to activate the tracing callbacks seems to handle correctly cases where fine-grained control is used on several APIs. This line can be safely deleted.
Isolated flushing instructions into a wrapping function. The file descriptor used for flushing is the one that is globally defined and not the one stored in the context_entry_t object as it is always the one that is defined globally that is used. If using a globally defined file descriptor is problematic (however it is the norm in the libtracer_tool.so library in ROCTracer) rather than passing it through arguments, the wrapping flushing function can be modified to take a void pointer. The file descriptor can then be passed through this pointer and be used in the default flushing function.
Isolated flushing instructions into a wrapping function. The file descriptor used for flushing is the one that is globally defined and not the one stored in the context_entry_t object as it is always the one that is defined globally that is used. If using a globally defined file descriptor is problematic (however it is the norm in the libtracer_tool.so library in ROCTracer) rather than passing it through arguments, the wrapping flushing function can be modified to take a void pointer. The file descriptor can then be passed through this pointer and be used in the default flushing function.
The signature of the function that flush metrics has been updated in order to have a standard signature for all the flushing functions. A new data structure that is passed as the only one argument for the function has also been defined
As for the metrics, the kernel flushing function signature has been updated and a new data structure has been defined
Definition of metric_trace_entry_t has been moved to a new header. This new header will contain the definitions of all the <API>_trace_entry_t types used to flush the payloads of the events. The purpose of this modification is to have only one header that needs to be included by developers that want to implement new plugins with the interface proposal.
Added the new header in list of headers. It will allow the new header to be copied to /opt/rocm/include/rocprofiler and /opt/rocm/rocprofiler/include when installing rocprofiler
Added the option to load plugins in rpl_run.sh. When this option is used with the plugin directory as parameter, the existence of the directory and of the libraries inside it are checked. If they all exist then an environment variable that will be used to know that a plugin is used is exported. Two other environment variables are also exported, they specify the paths to the .so libraries inside the plugin directory.
This update allows to export the path to the directory of the plugin since some plugins may need some files of the directory and require to know its path
Defined a function pointer that references the default flushing function if no plugin is used. If a plugin is used, the function defined in the plugin library will be loaded to this pointer
Same modifications as for metrics. Also the original text file is not created and opened anymore when a plugin is used
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.
This is the last pull request for the interface proposal. It adds the --output-plugin option in rocprof and instructions to overload user-defined flushing functions (that respect some specifications).
An example of a CTF plugin can be found here : https://github.com/dorsal-lab/rocprofiler_ctf_plugin/tree/rocm-4.3.x-PR5 (be sure to use the rocm-4.3.x-PR5 branch for tests).
Relative to the fourth pull request, this one starts at commit 86d43f3