Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITABase
Commits
2ab82d9f
Commit
2ab82d9f
authored
Aug 17, 2021
by
Pascal Palenda
Browse files
Fix some problems with methods only available with MSVC
parent
24f24e3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ITAProfiler/profiler.cpp
View file @
2ab82d9f
...
...
@@ -313,12 +313,12 @@ namespace ITAProfiler
jnRoot
.
set_name
(
"["
+
eventCountPair
.
first
.
sFunction
+
"]["
+
eventCountPair
.
first
.
sName
+
"]["
+
sThreadName
+
"]"
);
else
jnRoot
.
set_name
(
"["
+
eventCountPair
.
first
.
sFunction
+
"]["
+
eventCountPair
.
first
.
sName
+
"]["
+
std
::
to_string
(
eventCountPair
.
first
.
iThreadId
.
hash
(
)
)
+
"]"
);
std
::
to_string
(
std
::
hash
<
std
::
thread
::
id
>
()(
eventCountPair
.
first
.
iThreadId
)
)
+
"]"
);
jnRoot
.
push_back
(
JSONNode
(
"Name"
,
eventCountPair
.
first
.
sName
)
);
jnRoot
.
push_back
(
JSONNode
(
"File Name"
,
eventCountPair
.
first
.
sFile
)
);
jnRoot
.
push_back
(
JSONNode
(
"Function Name"
,
eventCountPair
.
first
.
sFunction
)
);
jnRoot
.
push_back
(
JSONNode
(
"Thread Id"
,
eventCountPair
.
first
.
iThreadId
.
hash
(
)
)
);
jnRoot
.
push_back
(
JSONNode
(
"Thread Id"
,
std
::
hash
<
std
::
thread
::
id
>
()(
eventCountPair
.
first
.
iThreadId
)
)
);
if
(
!
sThreadName
.
empty
(
)
)
jnRoot
.
push_back
(
JSONNode
(
"Thread Name"
,
sThreadName
)
);
...
...
@@ -373,13 +373,13 @@ namespace ITAProfiler
if
(
!
sThreadName
.
empty
(
)
)
jnRoot
.
set_name
(
"["
+
sectionPair
.
first
.
sFunction
+
"]["
+
sectionPair
.
first
.
sName
+
"]["
+
sThreadName
+
"]"
);
else
jnRoot
.
set_name
(
"["
+
sectionPair
.
first
.
sFunction
+
"]["
+
sectionPair
.
first
.
sName
+
"]["
+
std
::
to_string
(
sectionPair
.
first
.
iThreadId
.
hash
(
)
)
+
jnRoot
.
set_name
(
"["
+
sectionPair
.
first
.
sFunction
+
"]["
+
sectionPair
.
first
.
sName
+
"]["
+
std
::
to_string
(
std
::
hash
<
std
::
thread
::
id
>
()(
sectionPair
.
first
.
iThreadId
)
)
+
"]"
);
jnRoot
.
push_back
(
JSONNode
(
"Name"
,
sectionPair
.
first
.
sName
)
);
jnRoot
.
push_back
(
JSONNode
(
"File Name"
,
sectionPair
.
first
.
sFile
)
);
jnRoot
.
push_back
(
JSONNode
(
"Function Name"
,
sectionPair
.
first
.
sFunction
)
);
jnRoot
.
push_back
(
JSONNode
(
"Thread Id"
,
sectionPair
.
first
.
iThreadId
.
hash
(
)
)
);
jnRoot
.
push_back
(
JSONNode
(
"Thread Id"
,
std
::
hash
<
std
::
thread
::
id
>
()(
sectionPair
.
first
.
iThreadId
)
)
);
if
(
!
sThreadName
.
empty
(
)
)
jnRoot
.
push_back
(
JSONNode
(
"Thread Name"
,
sThreadName
)
);
...
...
@@ -451,12 +451,13 @@ namespace ITAProfiler
if
(
!
sThreadName
.
empty
(
)
)
jnRoot
.
set_name
(
"["
+
valuePair
.
first
.
sFunction
+
"]["
+
valuePair
.
first
.
sName
+
"]["
+
sThreadName
+
"]"
);
else
jnRoot
.
set_name
(
"["
+
valuePair
.
first
.
sFunction
+
"]["
+
valuePair
.
first
.
sName
+
"]["
+
std
::
to_string
(
valuePair
.
first
.
iThreadId
.
hash
(
)
)
+
"]"
);
jnRoot
.
set_name
(
"["
+
valuePair
.
first
.
sFunction
+
"]["
+
valuePair
.
first
.
sName
+
"]["
+
std
::
to_string
(
std
::
hash
<
std
::
thread
::
id
>
(
)
(
valuePair
.
first
.
iThreadId
)
)
+
"]"
);
jnRoot
.
push_back
(
JSONNode
(
"Name"
,
valuePair
.
first
.
sName
)
);
jnRoot
.
push_back
(
JSONNode
(
"File Name"
,
valuePair
.
first
.
sFile
)
);
jnRoot
.
push_back
(
JSONNode
(
"Function Name"
,
valuePair
.
first
.
sFunction
)
);
jnRoot
.
push_back
(
JSONNode
(
"Thread Id"
,
valuePair
.
first
.
iThreadId
.
hash
(
)
)
);
jnRoot
.
push_back
(
JSONNode
(
"Thread Id"
,
std
::
hash
<
std
::
thread
::
id
>
()(
valuePair
.
first
.
iThreadId
)
)
);
if
(
!
sThreadName
.
empty
(
)
)
jnRoot
.
push_back
(
JSONNode
(
"Thread Name"
,
sThreadName
)
);
...
...
src/ITAProfiler/profiler_data.h
View file @
2ab82d9f
...
...
@@ -4,6 +4,7 @@
// std includes
#include <cassert>
#include <vector>
#include <algorithm>
// simulation scheduler includes
#include "ITAProfiler/profiler.h"
...
...
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