Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
6ec5ae02
Commit
6ec5ae02
authored
Oct 22, 2019
by
Alexander Alekhin
Committed by
Alexander Alekhin
Oct 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core(trace): add ITT control parameter
- OPENCV_TRACE_ITT_ENABLE
parent
1864b64f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
trace.cpp
modules/core/src/trace.cpp
+18
-5
No files found.
modules/core/src/trace.cpp
View file @
6ec5ae02
...
...
@@ -196,14 +196,27 @@ static __itt_domain* domain = NULL;
static
bool
isITTEnabled
()
{
static
bool
isInitialized
=
false
;
static
volatile
bool
isInitialized
=
false
;
static
bool
isEnabled
=
false
;
if
(
!
isInitialized
)
{
isEnabled
=
!!
(
__itt_api_version
());
CV_LOG_ITT
(
"ITT is "
<<
(
isEnabled
?
"enabled"
:
"disabled"
));
domain
=
__itt_domain_create
(
"OpenCVTrace"
);
isInitialized
=
true
;
cv
::
AutoLock
lock
(
cv
::
getInitializationMutex
());
if
(
!
isInitialized
)
{
bool
param_traceITTEnable
=
utils
::
getConfigurationParameterBool
(
"OPENCV_TRACE_ITT_ENABLE"
,
true
);
if
(
param_traceITTEnable
)
{
isEnabled
=
!!
(
__itt_api_version
());
CV_LOG_ITT
(
"ITT is "
<<
(
isEnabled
?
"enabled"
:
"disabled"
));
domain
=
__itt_domain_create
(
"OpenCVTrace"
);
}
else
{
CV_LOG_ITT
(
"ITT is disabled through OpenCV parameter"
);
isEnabled
=
false
;
}
isInitialized
=
true
;
}
}
return
isEnabled
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment