Skip to content
Snippets Groups Projects
Commit ae942903 authored by Mike Collins's avatar Mike Collins
Browse files

Replace mp2_print_etc.h

parent 3e4d82b8
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,13 @@
// does not leave anything on the trace
Empty_producer Dummy(Dummy_event);
static int h_attempts = 0;
static int h_success = 0;
static int h_failed = 0;
static int h_failedarfn = 0;
static int h_successarfn = 0;
int debug = 0;
//=======================================
// print uses event_name_string[]
//-----------------------------------------
......@@ -24,6 +31,12 @@ void Composite_producer::harvest(){
int max_trace = 0;
int marked_traces_num = 0;
h_attempts = 0;
h_success = 0;
h_failed = 0;
h_failedarfn = 0;
h_successarfn = 0;
// to clear after root/composite traces
probability_list.clear();
report_list.clear();
......@@ -84,12 +97,30 @@ void Composite_producer::harvest(){
// calls this Composite_producer::traverse()
//************************************************
result = traverse(); // fills the Stack and relation lists
h_attempts++;
switch (result) {
case success_and_completed:
h_success++;
break;
case success_and_ready_for_next:
h_successarfn++;
break;
case failed:
h_failed++;
break;
case failed_and_ready_for_next:
h_failedarfn++;
break;
default:
break;
}
// relations are assembled/processed in the container objects
predecessor.pop_back(); // restore ordering for the previous nesting level
//printf("ELEM: %d\n", completeness_count);
if(result == failed){
//printf("FAILED: %d\n", completeness_count);
if(completeness_count == element_count) break;
// there are no more options to try
else continue;
......@@ -142,7 +173,24 @@ void Composite_producer::harvest(){
//show_traces();//<<<<<<<<<<<<<<<<<<<
} while(result != success_and_completed);
if (debug) {
printf("HARVEST TOTAL: %d\n",h_attempts);
printf("HARVEST SUCCESS: %d\n",h_success);
printf("HARVEST SUCCESS_ARFN: %d\n",h_successarfn);
printf("HARVEST FAILED: %d\n",h_failed);
printf("HARVEST FAILED_ARFN: %d\n",h_failedarfn);
printf("CP TOTAL: %d\n",cp_attempts);
printf("CP SUCCESS: %d\n",cp_success);
printf("CP SUCCESS_ARFN: %d\n",cp_successarfn);
printf("CP FAILED: %d\n",cp_failed);
printf("CP FAILED_ARFN: %d\n",cp_failedarfn);
printf("PERM TOTAL: %d\n",perm_attempts);
printf("PERM SUCCESS: %d\n",perm_success);
printf("PERM SUCCESS_ARFN: %d\n",perm_successarfn);
printf("PERM FAILED: %d\n",perm_failed);
printf("PERM FAILED_ARFN: %d\n",perm_failedarfn);
printf("CYCLES: %d\n", fw_cycles);
}
if(segments.size()){
cout<<"completed "<<event_name_string[name]<<": \t"<<segments.size()<<" traces ("<<
marked_traces_num<< " MARKed) \t"<<
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment