Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
vite
Commits
b0e35db3
Commit
b0e35db3
authored
Dec 05, 2018
by
Mathieu Faverge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A little more cleanup
parent
5e4b2574
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
87 deletions
+88
-87
src/parser/OTF2Parser/ParserDefinitionOTF2.cpp
src/parser/OTF2Parser/ParserDefinitionOTF2.cpp
+88
-87
No files found.
src/parser/OTF2Parser/ParserDefinitionOTF2.cpp
View file @
b0e35db3
/*
/*
** This file is part of the ViTE project.
** This file is part of the ViTE project.
**
**
** This software is governed by the CeCILL-A license under French law
** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** the economic rights, and the successive licensors have only limited
** liability.
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
**
**
** ViTE developers are (for version 0.* to 1.0):
** ViTE developers are (for version 0.* to 1.0):
**
**
** - COULOMB Kevin
** - COULOMB Kevin
** - FAVERGE Mathieu
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - NOISETTE Pascal
** - REDONDY Arthur
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
**
*/
*/
/**
/**
* @file ParserDefinitionOTF2.cpp
* @file ParserDefinitionOTF2.cpp
*
*
* @author François Trahay
* @author François Trahay
* @author Lagrasse Olivier
* @author Lagrasse Olivier
* @author Johnny Jazeix
* @author Johnny Jazeix
* @author Mathieu Faverge
* @author Mathieu Faverge
*
*
...
@@ -165,8 +165,8 @@ double ParserDefinitionOTF2::get_timestamp(OTF2_TimeStamp ts) {
...
@@ -165,8 +165,8 @@ double ParserDefinitionOTF2::get_timestamp(OTF2_TimeStamp ts) {
}
}
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefString
(
void
*/
*
userData
*/
,
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefString
(
void
*/
*
userData
*/
,
OTF2_StringRef
id
,
OTF2_StringRef
id
,
const
char
*
value
)
const
char
*
value
)
{
{
_strings
[
id
]
=
value
;
_strings
[
id
]
=
value
;
return
OTF2_CALLBACK_SUCCESS
;
return
OTF2_CALLBACK_SUCCESS
;
...
@@ -201,10 +201,10 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefSystemTreeNode(void
...
@@ -201,10 +201,10 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefSystemTreeNode(void
}
}
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefLocationGroup
(
void
*/
*
userdata
*/
,
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefLocationGroup
(
void
*/
*
userdata
*/
,
OTF2_LocationGroupRef
location_group_identifier
,
OTF2_LocationGroupRef
location_group_identifier
,
OTF2_StringRef
name
,
OTF2_StringRef
name
,
OTF2_LocationGroupType
type
,
OTF2_LocationGroupType
type
,
OTF2_SystemTreeNodeRef
system_tree_parent
)
{
OTF2_SystemTreeNodeRef
system_tree_parent
)
{
OTF2_LocationGroup
*
temp
=
new
OTF2_LocationGroup
();
OTF2_LocationGroup
*
temp
=
new
OTF2_LocationGroup
();
temp
->
_group_id
=
location_group_identifier
;
temp
->
_group_id
=
location_group_identifier
;
temp
->
_name_id
=
name
;
temp
->
_name_id
=
name
;
...
@@ -230,11 +230,11 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocationGroup(void */*userdat
...
@@ -230,11 +230,11 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocationGroup(void */*userdat
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefLocation
(
void
*
userData
,
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefLocation
(
void
*
userData
,
OTF2_LocationRef
locationIdentifier
,
OTF2_LocationRef
locationIdentifier
,
OTF2_StringRef
name_id
,
OTF2_StringRef
name_id
,
OTF2_LocationType
location_type
,
OTF2_LocationType
location_type
,
uint64_t
numberOfEvents
,
uint64_t
numberOfEvents
,
OTF2_LocationGroupRef
locationGroup
)
{
OTF2_LocationGroupRef
locationGroup
)
{
OTF2_Reader
*
reader
=
(
OTF2_Reader
*
)
userData
;
OTF2_Reader
*
reader
=
(
OTF2_Reader
*
)
userData
;
OTF2_EvtReader
*
evt_reader
=
OTF2_Reader_GetEvtReader
(
reader
,
locationIdentifier
);
OTF2_EvtReader
*
evt_reader
=
OTF2_Reader_GetEvtReader
(
reader
,
locationIdentifier
);
OTF2_DefReader
*
def_reader
=
OTF2_Reader_GetDefReader
(
reader
,
locationIdentifier
);
OTF2_DefReader
*
def_reader
=
OTF2_Reader_GetDefReader
(
reader
,
locationIdentifier
);
...
@@ -252,10 +252,10 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocation(void *userData,
...
@@ -252,10 +252,10 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocation(void *userData,
if
(
location_group
!=
NULL
)
{
if
(
location_group
!=
NULL
)
{
location_group
->
_location
[
locationIdentifier
]
=
temp
;
location_group
->
_location
[
locationIdentifier
]
=
temp
;
}
}
_location
[
locationIdentifier
]
=
temp
;
_location
[
locationIdentifier
]
=
temp
;
#if DEBUG
#if DEBUG
cout
<<
"DefLocation(id="
<<
locationIdentifier
<<
", name="
<<
temp
->
_id_string
<<
", parent="
;
cout
<<
"DefLocation(id="
<<
locationIdentifier
<<
", name="
<<
temp
->
_id_string
<<
", parent="
;
if
(
location_group
)
if
(
location_group
)
cout
<<
location_group
->
_id_string
;
cout
<<
location_group
->
_id_string
;
else
else
...
@@ -266,16 +266,16 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocation(void *userData,
...
@@ -266,16 +266,16 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefLocation(void *userData,
}
}
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefState
(
void
*
userData
,
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefState
(
void
*
userData
,
OTF2_RegionRef
self
,
OTF2_RegionRef
self
,
OTF2_StringRef
name
,
OTF2_StringRef
name
,
OTF2_StringRef
canonicalName
,
OTF2_StringRef
canonicalName
,
OTF2_StringRef
description
,
OTF2_StringRef
description
,
OTF2_RegionRole
regionRole
,
OTF2_RegionRole
regionRole
,
OTF2_Paradigm
paradigm
,
OTF2_Paradigm
paradigm
,
OTF2_RegionFlag
regionFlags
,
OTF2_RegionFlag
regionFlags
,
OTF2_StringRef
sourceFile
,
OTF2_StringRef
sourceFile
,
uint32_t
beginLineNumber
,
uint32_t
beginLineNumber
,
uint32_t
endLineNumber
)
{
uint32_t
endLineNumber
)
{
OTF2_Function
temp
=
{
name
,
canonicalName
,
description
,
regionRole
,
paradigm
,
regionFlags
,
sourceFile
,
beginLineNumber
,
endLineNumber
};
OTF2_Function
temp
=
{
name
,
canonicalName
,
description
,
regionRole
,
paradigm
,
regionFlags
,
sourceFile
,
beginLineNumber
,
endLineNumber
};
ParserDefinitionOTF2
::
_functions
[
self
]
=
temp
;
ParserDefinitionOTF2
::
_functions
[
self
]
=
temp
;
...
@@ -327,17 +327,18 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefMetricMember( void*
...
@@ -327,17 +327,18 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefMetricMember( void*
OTF2_Type
valueType
,
OTF2_Type
valueType
,
OTF2_Base
base
,
OTF2_Base
base
,
int64_t
exponent
,
int64_t
exponent
,
OTF2_StringRef
unit
)
{
OTF2_StringRef
unit
)
{
OTF2_MetricMember
temp
;
OTF2_MetricMember
temp
;
temp
.
_id
=
self
;
temp
.
_id
=
self
;
temp
.
_name
=
name
;
temp
.
_name
=
name
;
temp
.
_description
=
description
;
temp
.
_description
=
description
;
temp
.
_metricType
=
metricType
;
temp
.
_metricType
=
metricType
;
temp
.
_metricMode
=
metricMode
;
temp
.
_metricMode
=
metricMode
;
temp
.
_valueType
=
valueType
;
temp
.
_valueType
=
valueType
;
temp
.
_base
=
base
;
temp
.
_base
=
base
;
temp
.
_exponent
=
exponent
;
temp
.
_exponent
=
exponent
;
temp
.
_unit
=
unit
;
temp
.
_unit
=
unit
;
ParserDefinitionOTF2
::
_metric_member
[
self
]
=
temp
;
ParserDefinitionOTF2
::
_metric_member
[
self
]
=
temp
;
...
@@ -349,12 +350,12 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefMetricClass( void*
...
@@ -349,12 +350,12 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefMetricClass( void*
uint8_t
numberOfMetrics
,
uint8_t
numberOfMetrics
,
const
OTF2_MetricMemberRef
*
metricMembers
,
const
OTF2_MetricMemberRef
*
metricMembers
,
OTF2_MetricOccurrence
metricOccurrence
,
OTF2_MetricOccurrence
metricOccurrence
,
OTF2_RecorderKind
recorderKind
)
{
OTF2_RecorderKind
recorderKind
)
{
OTF2_MetricClass
temp
;
OTF2_MetricClass
temp
;
temp
.
_id
=
self
;
temp
.
_id
=
self
;
temp
.
_metricOccurrence
=
metricOccurrence
;
temp
.
_metricOccurrence
=
metricOccurrence
;
temp
.
_recorderKind
=
recorderKind
;
temp
.
_recorderKind
=
recorderKind
;
for
(
int
i
=
0
;
i
<
numberOfMetrics
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numberOfMetrics
;
i
++
)
{
temp
.
_metricMembers
.
push_back
(
metricMembers
[
i
]);
temp
.
_metricMembers
.
push_back
(
metricMembers
[
i
]);
...
@@ -369,16 +370,16 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefMetricInstance( void*
...
@@ -369,16 +370,16 @@ OTF2_CallbackCode ParserDefinitionOTF2::handler_DefMetricInstance( void*
OTF2_MetricRef
metricClass
,
OTF2_MetricRef
metricClass
,
OTF2_LocationRef
recorder
,
OTF2_LocationRef
recorder
,
OTF2_MetricScope
metricScope
,
OTF2_MetricScope
metricScope
,
uint64_t
scope
)
{
uint64_t
scope
)
{
cout
<<
__FUNCTION__
<<
" not implemented
\n
"
;
cout
<<
__FUNCTION__
<<
" not implemented
\n
"
;
return
OTF2_CALLBACK_SUCCESS
;
return
OTF2_CALLBACK_SUCCESS
;
}
}
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefMetricClassRecorder
(
void
*
userData
,
OTF2_CallbackCode
ParserDefinitionOTF2
::
handler_DefMetricClassRecorder
(
void
*
userData
,
OTF2_MetricRef
metric
,
OTF2_MetricRef
metric
,
OTF2_LocationRef
recorder
)
{
OTF2_LocationRef
recorder
)
{
cout
<<
__FUNCTION__
<<
" not implemented
\n
"
;
cout
<<
__FUNCTION__
<<
" not implemented
\n
"
;
return
OTF2_CALLBACK_SUCCESS
;
return
OTF2_CALLBACK_SUCCESS
;
}
}
...
@@ -583,10 +584,10 @@ void ParserDefinitionOTF2::create_metric_member(Trace *t, OTF2_MetricMember m) {
...
@@ -583,10 +584,10 @@ void ParserDefinitionOTF2::create_metric_member(Trace *t, OTF2_MetricMember m) {
std
::
map
<
OTF2_LocationRef
,
OTF2_Location
*
>::
const_iterator
it_l
;
std
::
map
<
OTF2_LocationRef
,
OTF2_Location
*
>::
const_iterator
it_l
;
it_l
=
_location
.
begin
();
it_l
=
_location
.
begin
();
if
(
it_l
!=
_location
.
end
())
{
if
(
it_l
!=
_location
.
end
())
{
OTF2_Location
*
n
=
(
*
it_l
).
second
;
OTF2_Location
*
n
=
(
*
it_l
).
second
;
if
(
n
)
{
if
(
n
)
{
temp_container_type
=
t
->
search_container_type
(
String
(
get_string_by_id
(
n
->
_name_id
)));
temp_container_type
=
t
->
search_container_type
(
String
(
get_string_by_id
(
n
->
_name_id
)));
}
}
}
}
if
(
!
temp_container_type
)
if
(
!
temp_container_type
)
temp_container_type
=
t
->
search_container_type
(
String
(
"0"
));
temp_container_type
=
t
->
search_container_type
(
String
(
"0"
));
...
...
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