Subversion Repositories shark

Compare Revisions

Regard whitespace Rev 1509 → Rev 1510

/demos/trunk/newtrace/utils/extract.c
33,8 → 33,8
unsigned long long tsc;
};
 
void Error(int num) {
printf("Finite-State machine error: %d\n",num);
void Error(int num, int line) {
printf("Finite-State machine error %d at line %d\n",num,line);
exit(2);
}
 
477,7 → 477,7
switch (type) {
 
case 0:
if (state != 0) Error(1);
if (state != 0) Error(1,k);
printf("EVT:Log starts at [%12llu]\n",tsc);
last_tsc = tsc;
log_start_tsc = tsc;
497,7 → 497,7
/* Int start */
case 2:
if (state == 0) Error(2);
if (state == 0) Error(2,k);
exec_list[current_exec].dtsc = tsc - last_tsc;
exec_list[current_exec].ctx = current_context;
current_exec++;
509,7 → 509,7
 
/* Int end */
case 3:
if (state != 2) Error(3);
if (state != 2) Error(3,k);
exec_list[current_exec].dtsc = tsc - last_tsc;
exec_list[current_exec].ctx = current_context;
current_exec++;
568,7 → 568,7
 
for (i=0;i<context_total;i++)
if (par1 == context_list[i].ctx) break;
if (i == context_total) Error(5);
if (i == context_total) Error(5,k);
else {
 
kill_delta += 1000;
594,7 → 594,7
 
for (i=0;i<context_total;i++)
if (par1 == context_list[i].ctx) break;
if (i == context_total) Error(4);
if (i == context_total) Error(4,k);
endcycle_list[current_endcycle].ctx = par1;
endcycle_list[current_endcycle].tsc = tsc;