You start with a source code, where some code snippets to be defined as tasks and then using profiling with proper configuration, you get defined task details (time information etc.) in the report.csv. Presently, it is supported in CLI mode profiling only and no GUI is supported.
- Have your buildable source code to be profiled with Task APIs.
- Instrument the source code with task APIs.
- Include the header AMDProfileController.h in the
source file where you want to create a task. Path of this header
is:
<Installation Directory>/include/AMDProfileController.hExample:Hence that folder must be in the include path, while building the instrumented application.~/Foo/Bar/AMDuProf_Linux_x64_5.0.775/include/AMDProfileController.h - Create domain and get domain handle using amdDomainCreate(…).
- Create string handle, using amdStringHandleCreate(…), which is used to name a task.
- Using domain handle and string handle create a task and mark the start of the task – both are done with single call amdTaskBegin(…) and then your code (which is part of the task) comes.
- Call amdTaskEnd(…) to mark the end of the task.
- Can add more than one tasks in similar way.
- Include the header AMDProfileController.h in the
source file where you want to create a task. Path of this header
is:
- For linking, the library user must include the library path of libAMDProfileController.so whose path is: <Installation Directory>/lib/x64/shared/libAMDProfileController.so.
- Build the instrumented application.
- Run the application under CLI
profiler:
$ AMDuProfCLI collect --config tbp -o <outputFolderPath> <applicationNameToBeProfiled> - Generate the report:
(i)
$ AMDuProfCLI report –i < outputFolderPath > or (ii) detailed report: AMDuProfCLI report –i < outputFolderPath > --detail- Summary
report:
$ AMDuProfCLI report –i < outputFolderPath > - Detailed
report:
$AMDuProfCLI report –i < outputFolderPath > --detail
- Summary
report:
Examples codes are given for different use cases in the following directories:
- C++:
<Installation Directory>/Examples/ClassicDomainTaskAPI - Python:
<Installation Directory>/Examples/ClassicDomainTaskAPI/python