Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1568 → Rev 1567

/demos/trunk/newtrace/instr/initfile.c
54,7 → 54,7
 
/*+ Interrupt Server +*/
#define INTDRIVE_Q 1000
#define INTDRIVE_U 0.1*MAX_BANDWIDTH
#define INTDRIVE_T 10000
#define INTDRIVE_FLAG 0
 
void call_shutdown_task(void *arg);
68,11 → 68,10
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
LEVEL EDF_level;
 
INTDRIVE_register_level(INTDRIVE_Q, INTDRIVE_Q, INTDRIVE_U, INTDRIVE_FLAG);
EDF_level = EDF_register_level(EDF_ENABLE_ALL);
CBS_register_level(CBS_ENABLE_ALL, EDF_level);
INTDRIVE_register_level(INTDRIVE_Q, INTDRIVE_T, INTDRIVE_FLAG);
EDF_register_level(EDF_ENABLE_ALL);
CBS_register_level(CBS_ENABLE_ALL, 1);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
/demos/trunk/newtrace/initfile/initfile.c
64,7 → 64,7
 
/*+ Interrupt Server +*/
#define INTDRIVE_Q 1000
#define INTDRIVE_U 0.1*MAX_BANDWIDTH
#define INTDRIVE_U 1000
#define INTDRIVE_FLAG 0
 
void call_shutdown_task(void *arg);
81,11 → 81,10
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
LEVEL EDF_level;
 
INTDRIVE_register_level(INTDRIVE_Q, INTDRIVE_Q, INTDRIVE_U, INTDRIVE_FLAG);
EDF_level = EDF_register_level(EDF_ENABLE_ALL);
HCBS_register_level(HCBS_ENABLE_ALL, EDF_level);
EDF_register_level(EDF_ENABLE_ALL);
HCBS_register_level(HCBS_ENABLE_ALL, 1);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
/demos/trunk/newtrace/udp/initfile.c
54,7 → 54,7
 
/*+ Interrupt Server +*/
#define INTDRIVE_Q 1000
#define INTDRIVE_U 0.1*MAX_BANDWIDTH
#define INTDRIVE_U 1000
#define INTDRIVE_FLAG 0
 
void call_shutdown_task(void *arg);
68,11 → 68,10
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
LEVEL EDF_level;
 
INTDRIVE_register_level(INTDRIVE_Q, INTDRIVE_Q, INTDRIVE_U, INTDRIVE_FLAG);
EDF_level = EDF_register_level(EDF_ENABLE_ALL);
CBS_register_level(CBS_ENABLE_ALL, EDF_level);
EDF_register_level(EDF_ENABLE_ALL);
CBS_register_level(CBS_ENABLE_ALL, 1);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
/demos/trunk/newtrace/udp/udptrace.c
7,7 → 7,6
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
* Tullio Facchinetti <tullio.facchinetti@unipv.it>
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
14,7 → 13,6
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
* http://robot.unipv.it
*/
 
#include <kernel/kern.h>
33,7 → 31,6
struct timespec start,end,diff;
SYS_FLAGS f;
 
/** Create 3 chunks for storing the tracer events. */
a = FTrace_chunk_create(1000000, 1000000, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC);
b = FTrace_chunk_create(1000000, 1000000, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_JTN);
c = FTrace_chunk_create(1000000, 1000000, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC);
41,16 → 38,10
FTrace_chunk_link(a,b);
FTrace_chunk_link(b,c);
 
/** Select the first chunk for saving the events. */
FTrace_actual_chunk_select(a);
 
kern_gettime(&start);
/** Start the tracer. */
FTrace_enable();
/** Disable the filtering for timer related events. */
FTrace_set_filter(FTrace_filter_timer, 1);
 
TRACER_LOGEVENT(FTrace_EVT_trace_start,proc_table[exec_shadow].context,clk_per_msec);
 
59,11 → 50,7
(unsigned short int)proc_table[i].context,i);
 
for (i=0;i<1000000000;i++);
/** Enable the filtering for timer related events. */
FTrace_set_filter(FTrace_filter_timer, 0);
/** Change the chunk where the events are stored. */
TRACER_LOGEVENT(FTrace_EVT_next_chunk,0,0);
f = kern_fsave();
80,10 → 67,8
for (i=0;i<1000000000;i++);
 
/** Store a TFrace stop event. */
TRACER_LOGEVENT(FTrace_EVT_trace_stop,0,0);
 
/** Stop the tracer. */
FTrace_disable();
kern_gettime(&end);
 
91,18 → 76,8
 
cprintf("Logged Time %d s %d us\n",(int)diff.tv_sec,(int)diff.tv_nsec/1000);
 
/** Initialize the network for remotely saving the trace. */
FTrace_OSD_init_udp(1, "192.168.1.10", "192.168.1.1");
/**
* You may want to save the events to disk. In that case, simply change
* the network initialization instruction with the following line:
*
* FTrace_init_disk_writer("trace.dat", 0, NULL, NULL);
*
*/
 
/** Save the chunk. */
FTrace_send_chunk(a, 0, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC);
FTrace_send_chunk(b, 0, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_JTN);
 
/demos/trunk/newtrace/utils/list.c
7,7 → 7,6
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
* Tullio Facchinetti <tullio.facchinetti@unipv.it>
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
14,7 → 13,6
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
* http://robot.unipv.it
*/
 
#include <stdio.h>
31,8 → 29,6
char buffer[READ_BUFFER+DELTA_BUFFER];
void *p, *last;
int n,delta,size;
unsigned long long tsc_value;
 
unsigned long long ev = 0;
 
63,15 → 59,12
 
printf("%08d Type = %02x ",(unsigned int)ev,*(unsigned short int *)(p));
tsc_value = (unsigned long long)(*(unsigned int *)(p+4)) << 32;
tsc_value += (unsigned long long)(*(unsigned int *)(p+8));
printf("TSC = %llu (%08x:%08x)",tsc_value, *(unsigned int *)(p+4),*(unsigned int *)(p+8));
printf("TSC = %08x:%08x",*(unsigned int *)(p+4),*(unsigned int *)(p+8));
 
size = 16;
 
printf(" Par1 = %11d",*(unsigned short int *)(p+2));
printf(" Par2 = %11d\n",*(unsigned int *)(p+12));
printf(" Par1 = %d",*(unsigned short int *)(p+2));
printf(" Par2 = %d\n",*(unsigned int *)(p+12));
 
ev++;
/demos/trunk/newtrace/nosave/makefile
12,5 → 12,5
include $(BASE)/config/example.mk
 
nosave:
make -f $(SUBMAKE) BASE=$(BASE) APP=nosave INIT= OTHEROBJS="initfile.o" OTHERINCL= SHARKOPT="__LINUXC26__ __PCI__ __INPUT__"
make -f $(SUBMAKE) BASE=$(BASE) APP=nosave INIT= OTHEROBJS="initfile.o" OTHERINCL= SHARKOPT="__LINUXC26__ __PCI__ __INPUT__ __NET__"
 
/demos/trunk/newtrace/readme
8,7 → 8,6
udpdump - save on a file the logged events sent through network
 
udp - a small application that sends its trace data through the network
the new version also contains the code to configure the output to disk
 
nosave - a simple tracer implementation without saving logged events