Skip to content

Commit ab8dbad

Browse files
joshibhaSarbojit2019zma2
authored
Added ITT Option (intel#58)
* Added ITT Option * Updated Code after Review for ITT Options * Updated Readme for ITT Logging --------- Co-authored-by: Sarbojit2019 <[email protected]> Co-authored-by: CodeSlinger <[email protected]>
1 parent 3815670 commit ab8dbad

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

tools/unitrace/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ The options can be one or more of the following:
5656
--chrome-sycl-logging Trace SYCL runtime and plugin
5757
--chrome-ccl-logging Trace oneCCL
5858
--chrome-dnn-logging Trace oneDNN
59+
--chrome-itt-logging Trace activities in applications instrumented using Intel(R) Instrumentation and Tracing Technology APIs
5960
--chrome-call-logging Trace Level Zero and/or OpenCL host calls
6061
--chrome-kernel-logging Trace device and host kernel activities
6162
--chrome-device-logging Trace device activities
@@ -217,6 +218,10 @@ The **--chrome-ccl-logging** traces CCL runtime activities
217218

218219
Similarly, one can use **--chrome-dnn-logging** for oneDNN.
219220

221+
The **--chrome-itt-logging** traces activities in applications instrumented using Intel(R) Instrumentation and Tracing Technology APIs
222+
223+
![ITT logging!](/tools/unitrace/doc/images/chrome_itt_logging.png)
224+
220225
The **--ccl-summary-report [-r]** option outputs CCL call timing summary:
221226
![CCL Call Timing!](/tools/unitrace/doc/images/ccl_summary_report.png)
222227

39.4 KB
Loading

tools/unitrace/src/unitrace.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ void Usage(char * progname) {
9191
"--chrome-device-logging " <<
9292
"Trace device activities" <<
9393
std::endl;
94+
std::cout <<
95+
"--chrome-itt-logging " <<
96+
"Trace activities in applications instrumented using Intel(R) Instrumentation and Tracing Technology APIs" <<
97+
std::endl;
9498
std::cout <<
9599
"--chrome-no-thread-on-device " <<
96100
"Trace device activities without per-thread info." << std::endl <<
@@ -386,6 +390,9 @@ int ParseArgs(int argc, char* argv[]) {
386390
} else if (strcmp(argv[i], "--version") == 0) {
387391
std::cout << UNITRACE_VERSION << " (" << COMMIT_HASH << ")" << std::endl;
388392
return 0;
393+
} else if (strcmp(argv[i], "--chrome-itt-logging") == 0 ) {
394+
utils::SetEnv("UNITRACE_ChromeIttLogging", "1");
395+
++app_index;
389396
} else {
390397
break;
391398
}

0 commit comments

Comments
 (0)