Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1348 → Rev 1369

/demos/trunk/loader/shark/shark.c
2,6 → 2,9
#include "calibrate.h"
#include <tracer.h>
 
#include "FTrace_udp.h"
#include "FTrace_chunk.h"
 
extern int cal_cycles;
extern struct timespec zero_time;
extern struct loader_task loader_task_list[];
10,6 → 13,7
extern int total_loader_contract;
 
mutex_t mutex_table[MAX_MUTEX];
int main_chunk;
 
/* Runtime Calibration */
int calibrate_cycle()
103,33 → 107,18
#ifdef __NEW_TRACER__
extern __volatile__ unsigned int TracerEventsPresent;
unsigned int k;
SYS_FLAGS f;
sleep(1);
tracer_init_udp(1,"192.168.1.10","192.168.1.1");
FTrace_OSD_init_udp(1,"192.168.0.123","192.168.0.12");
 
tracer_create_udp_task(NULL,80);
f = kern_fsave();
k = TracerEventsPresent;
kern_frestore(f);
while(k > 0) {
f = kern_fsave();
printf_xy(0,5,WHITE,"REM = %08d",k);
k = TracerEventsPresent;
kern_frestore(f);
}
tracer_flush_sent_events();
#endif
FTrace_send_chunk(main_chunk, 0, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC);
 
while(1);
#else
sys_end();
 
#endif
 
return NULL;
}
140,16 → 129,13
 
int i;
struct loader_task *l = loader_task_list;
extern __volatile__ unsigned int TracerEventsPresent;
 
NRT_TASK_MODEL nrt;
 
TRACER_LOGEVENT(FTrace_EVT_trace_stop,0,0);
tracer_disable();
FTrace_disable();
 
cprintf("Total Events Present %d\n",TracerEventsPresent);
 
i = 0;
while (i < total_loader_task) {
194,10 → 180,12
 
#ifdef __NEW_TRACER__
 
tracer_initialize(10000000);
main_chunk = FTrace_chunk_create(10000000, 1000, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC);
FTrace_actual_chunk_select(main_chunk);
FTrace_enable();
 
tracer_enable();
 
#endif
 
TRACER_LOGEVENT(FTrace_EVT_trace_start,0,0);