Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 887128d9 authored by François Trahay's avatar François Trahay
Browse files

fix start/end link for OTF trace files (traces generated with eztrace/gtg can...

fix start/end link for OTF trace files (traces generated with eztrace/gtg can now be visualized properly)
parent 4c436df7
Branches
Tags
No related merge requests found
......@@ -380,7 +380,8 @@ int ParserEventOTF::handler_send_message (void *trace, uint64_t time, uint32_t s
Process temp_sender = ParserDefinitionOTF::get_process_by_id(sender);
Process temp_receiver = ParserDefinitionOTF::get_process_by_id(receiver);
Process temp_ancestor = ParserDefinitionOTF::get_process_by_id(temp_sender._parent);
// The sender process may have no ancestor, so let's say that his ancestor is himself
Process temp_ancestor = temp_sender;
ProcessGroup sender_group = ParserDefinitionOTF::get_processgroup_by_process(sender);
ProcessGroup receiver_group = ParserDefinitionOTF::get_processgroup_by_process(receiver);
ProcessGroup ancestor_group = ParserDefinitionOTF::get_processgroup_by_process(temp_sender._parent);
......@@ -423,18 +424,23 @@ int ParserEventOTF::handler_send_message (void *trace, uint64_t time, uint32_t s
_containers[sender_string] = source_container;
}
if(_containers.find(receiver_string) != _containers.end()) {
ancestor_container = _containers[receiver_string];
if(_containers.find(ancestor_string) != _containers.end() && !_containers.empty()) {
// found
ancestor_container = _containers[ancestor_string];
}
else {
ancestor_container = t->search_container(receiver_string);
_containers[receiver_string] = ancestor_container;
// receiver not found
ancestor_container = t->search_container(ancestor_string);
if(ancestor_container) {
_containers[ancestor_string] = ancestor_container;
}
}
if(ancestor_type == 0) {
// No ancestor
ancestor_type = source_type;
}
if(ancestor_container == 0) {
// No ancestor
ancestor_container = source_container;
......@@ -491,20 +497,23 @@ int ParserEventOTF::handler_send_message (void *trace, uint64_t time, uint32_t s
}
int ParserEventOTF::handler_receive_message (void *trace, uint64_t time, uint32_t receiver, uint32_t sender, uint32_t group, uint32_t type, uint32_t length, uint32_t source) {
Trace *t = (Trace *)trace;
Date d = (double)time/(double)ParserDefinitionOTF::get_ticks_per_second();
Process temp_sender = ParserDefinitionOTF::get_process_by_id(sender);
Process temp_receiver = ParserDefinitionOTF::get_process_by_id(receiver);
Process temp_ancestor = ParserDefinitionOTF::get_process_by_id(temp_sender._parent);
// The sender process may have no ancestor, so let's say that his ancestor is himself
Process temp_ancestor = temp_sender;
String sender_string = String(temp_sender._name);
String ancestor_string = String(temp_ancestor._name);
String receiver_string = String(temp_receiver._name);
ProcessGroup sender_group = ParserDefinitionOTF::get_processgroup_by_process(sender);
ProcessGroup receiver_group = ParserDefinitionOTF::get_processgroup_by_process(receiver);
ProcessGroup ancestor_group = ParserDefinitionOTF::get_processgroup_by_process(temp_sender._parent);
String sender_group_string = String(sender_group._name);
String ancestor_group_string = String(ancestor_group._name);
String receiver_group_string = String(receiver_group._name);
......@@ -522,14 +531,15 @@ int ParserEventOTF::handler_receive_message (void *trace, uint64_t time, uint32_
Container *destination_cont = NULL;
Container *ancestor_cont = NULL;
Container *sender_cont = NULL;
ContainerType *destination_type = t->search_container_type(receiver_group_string);
ContainerType *ancestor_type = t->search_container_type(ancestor_group_string);
ContainerType *sender_type = t->search_container_type(sender_group_string);
EntityValue *value;
map<string, Value *> opt;
if(_containers.find(receiver_string) != _containers.end()) {
destination_cont = _containers[receiver_string];
......@@ -539,21 +549,23 @@ int ParserEventOTF::handler_receive_message (void *trace, uint64_t time, uint32_
_containers[receiver_string] = destination_cont;
}
if(_containers.find(ancestor_string) != _containers.end()) {
if(_containers.find(ancestor_string) != _containers.end() && !_containers.empty()) {
ancestor_cont = _containers[ancestor_string];
}
else {
ancestor_cont = t->search_container(ancestor_string);
_containers[ancestor_string] = ancestor_cont;
if(ancestor_cont)
_containers[ancestor_string] = ancestor_cont;
}
if(ancestor_type == 0) {
// No ancestor
ancestor_type = destination_type;
ancestor_type = sender_type;
}
if(ancestor_cont == 0) {
// No ancestor
ancestor_cont = destination_cont;
ancestor_cont = sender_cont;
}
if(link_type == 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment