Commit 50a1589f authored by Mathieu Faverge's avatar Mathieu Faverge

Update the changes in OTF parser

parent 7257d5aa
......@@ -118,7 +118,7 @@ int OTFTraceBuilderThread::handler_begin_process(OTF_Trace_builder_struct* tb_st
}
if(process_container_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::VITE_ERRCODE_ERROR);
}
if(parent_container == 0 && process_parent._name != "0") {
// Create the parent process
......@@ -157,10 +157,10 @@ int OTFTraceBuilderThread::handler_end_process (OTF_Trace_builder_struct* tb_str
}
if(temp_container_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::VITE_ERRCODE_ERROR);
}
else if(temp_container == 0 && process._name != "0") {
Error::set(Error::_UNKNOWN_CONTAINER + process._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + process._name, Error::VITE_ERRCODE_ERROR);
}
t->destroy_container(d, temp_container, temp_container_type, extra_fields);
......@@ -242,13 +242,13 @@ int OTFTraceBuilderThread::handler_enter (OTF_Trace_builder_struct* tb_struct) {
// Check if nothing is empty
if(temp_state_type == 0 && temp_function_group._name != "0") {
Error::set(Error::_UNKNOWN_STATE_TYPE + temp_function_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_STATE_TYPE + temp_function_group._name, Error::VITE_ERRCODE_ERROR);
}
if(temp_container == 0 && temp_proc._name != "0") {
Error::set(Error::_UNKNOWN_CONTAINER + temp_function_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + temp_function_group._name, Error::VITE_ERRCODE_ERROR);
}
if(temp_value == 0 && temp_proc._name != "0") {
Error::set(Error::_UNKNOWN_ENTITY_VALUE + temp_proc._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_ENTITY_VALUE + temp_proc._name, Error::VITE_ERRCODE_ERROR);
}
t->set_state(d, temp_state_type, temp_container, temp_value, extra_fields);
......@@ -317,10 +317,10 @@ int OTFTraceBuilderThread::handler_counter(OTF_Trace_builder_struct* tb_struct)
// Check if nothing is empty
if(temp_variable_type == 0 && temp_counter_group._name != "0") {
Error::set(Error::_UNKNOWN_VARIABLE_TYPE + temp_counter_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_VARIABLE_TYPE + temp_counter_group._name, Error::VITE_ERRCODE_ERROR);
}
if(temp_container == 0 && temp_proc._name != "0") {
Error::set(Error::_UNKNOWN_CONTAINER + temp_counter_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + temp_counter_group._name, Error::VITE_ERRCODE_ERROR);
}
t->set_variable(d, temp_variable_type, temp_container, tb_struct->value, extra_fields);
......@@ -378,10 +378,10 @@ int OTFTraceBuilderThread::handler_marker(OTF_Trace_builder_struct* tb_struct) {
// Check if nothing is empty
if(event_type == 0) {
Error::set(Error::_UNKNOWN_EVENT_TYPE + n.to_string(), Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_EVENT_TYPE + n.to_string(), Error::VITE_ERRCODE_ERROR);
}
if(temp_container == 0 && temp_proc._name != "0") {
//Error::set(Error::_UNKNOWN_CONTAINER + temp_counter_group._name, Error::_ERROR);
//Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + temp_counter_group._name, Error::VITE_ERRCODE_ERROR);
}
t->new_event(d, event_type, temp_container, value, extra_fields);
......@@ -471,16 +471,16 @@ int OTFTraceBuilderThread::handler_send_message (OTF_Trace_builder_struct* tb_st
// Check if nothing is empty
if(source_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_sender._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_sender._name, Error::VITE_ERRCODE_ERROR);
}
if(destination_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::VITE_ERRCODE_ERROR);
}
if(ancestor_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::VITE_ERRCODE_ERROR);
}
if(link_type == 0) {
Error::set(Error::_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::VITE_ERRCODE_ERROR);
}
/* Creation of the optional fields */
......@@ -593,13 +593,13 @@ int OTFTraceBuilderThread::handler_receive_message (OTF_Trace_builder_struct* tb
// Check if nothing is empty
if(destination_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::VITE_ERRCODE_ERROR);
}
if(ancestor_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::VITE_ERRCODE_ERROR);
}
if(link_type == 0) {
Error::set(Error::_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::VITE_ERRCODE_ERROR);
}
/* Creation of the optional fields */
......
......@@ -107,7 +107,7 @@ int ParserEventOTF::handler_begin_process(void *trace, uint64_t time, uint32_t p
}
if(process_container_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::VITE_ERRCODE_ERROR);
}
if(parent_container == 0 && process_parent._name != "0") {
// Create the parent process
......@@ -145,10 +145,10 @@ int ParserEventOTF::handler_end_process (void *trace, uint64_t time, uint32_t pr
}
if(temp_container_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + process_group._name, Error::VITE_ERRCODE_ERROR);
}
else if(temp_container == 0 && process._name != "0") {
Error::set(Error::_UNKNOWN_CONTAINER + process._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + process._name, Error::VITE_ERRCODE_ERROR);
}
t->destroy_container(d, temp_container, temp_container_type, extra_fields);
......@@ -228,13 +228,13 @@ int ParserEventOTF::handler_enter (void *trace, uint64_t time, uint32_t func_id,
// Check if nothing is empty
if(temp_state_type == 0 && temp_function_group._name != "0") {
Error::set(Error::_UNKNOWN_STATE_TYPE + temp_function_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_STATE_TYPE + temp_function_group._name, Error::VITE_ERRCODE_ERROR);
}
if(temp_container == 0 && temp_proc._name != "0") {
Error::set(Error::_UNKNOWN_CONTAINER + temp_function_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + temp_function_group._name, Error::VITE_ERRCODE_ERROR);
}
if(temp_value == 0 && temp_proc._name != "0") {
Error::set(Error::_UNKNOWN_ENTITY_VALUE + temp_proc._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_ENTITY_VALUE + temp_proc._name, Error::VITE_ERRCODE_ERROR);
}
t->set_state(d, temp_state_type, temp_container, temp_value, extra_fields);
......@@ -302,10 +302,10 @@ int ParserEventOTF::handler_counter(void *trace, uint64_t time, uint32_t proc_id
// Check if nothing is empty
if(temp_variable_type == 0 && temp_counter_group._name != "0") {
Error::set(Error::_UNKNOWN_VARIABLE_TYPE + temp_counter_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_VARIABLE_TYPE + temp_counter_group._name, Error::VITE_ERRCODE_ERROR);
}
if(temp_container == 0 && temp_proc._name != "0") {
Error::set(Error::_UNKNOWN_CONTAINER + temp_counter_group._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + temp_counter_group._name, Error::VITE_ERRCODE_ERROR);
}
t->set_variable(d, temp_variable_type, temp_container, value, extra_fields);
......@@ -363,10 +363,10 @@ int ParserEventOTF::handler_marker(void *trace, uint64_t time, uint32_t proc_id,
// Check if nothing is empty
if(event_type == 0) {
Error::set(Error::_UNKNOWN_EVENT_TYPE + n.to_string(), Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_EVENT_TYPE + n.to_string(), Error::VITE_ERRCODE_ERROR);
}
if(temp_container == 0 && temp_proc._name != "0") {
//Error::set(Error::_UNKNOWN_CONTAINER + temp_counter_group._name, Error::_ERROR);
//Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER + temp_counter_group._name, Error::VITE_ERRCODE_ERROR);
}
t->new_event(d, event_type, temp_container, value, extra_fields);
......@@ -456,16 +456,16 @@ int ParserEventOTF::handler_send_message (void *trace, uint64_t time, uint32_t s
// Check if nothing is empty
if(source_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_sender._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_sender._name, Error::VITE_ERRCODE_ERROR);
}
if(destination_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::VITE_ERRCODE_ERROR);
}
if(ancestor_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::VITE_ERRCODE_ERROR);
}
if(link_type == 0) {
Error::set(Error::_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::VITE_ERRCODE_ERROR);
}
/* Creation of the optional fields */
......@@ -578,13 +578,13 @@ int ParserEventOTF::handler_receive_message (void *trace, uint64_t time, uint32_
// Check if nothing is empty
if(destination_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_receiver._name, Error::VITE_ERRCODE_ERROR);
}
if(ancestor_type == 0) {
Error::set(Error::_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_CONTAINER_TYPE + temp_ancestor._name, Error::VITE_ERRCODE_ERROR);
}
if(link_type == 0) {
Error::set(Error::_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::_ERROR);
Error::set(Error::VITE_ERR_UNKNOWN_LINK_TYPE + link_type_oss.str(), Error::VITE_ERRCODE_ERROR);
}
/* Creation of the optional fields */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment