How it works

ViTE parses a text file in Pajé or OTF format to visualize execution traces:

Pajé input data Format, J. Chassin de Kergommeaux, B. de Oliveira Stein, Grégory Mounié, Technical Report, draft 2003.

This does not provide a library to instrument your code and generate these files. You need to instrument your code yourself to generate the trace of events you want to see in your program. See here for more informations on tools that can generate traces. ViTE will help you to respect the Pajé format, show you the sequence of event of your program and give you statistics on these events.

Trace examples

Just look at a simple example: philosophers.c which generates a Pajé trace. philosophersOTF.c generates an OTF trace. These two files are an implementation of the dining philosophers problem with semaphores. To compile it just use the following command:

gcc -o philosophers philosophers.c -lpthread -lrt
gcc -g -W -Wall philosophersOTF.c -o philosophersOTF -lpthread -lrt -IdirOTFHeaders -LdirOTFLib -lotf -lz
where dirOTFHeaders is the directory where headers of OTF are and dirOTFLib is where the libotf is.

Finally, just execute the program:

./philosophers
./philosophersOTF

This will create "philosophers.trace" and the otf files that you can display with ViTE:

vite philosophers.trace
vite philosophers.otf

We can observe the different states of the philosophers (think: grey, hungry: red, eat: blue) and the lock set on forks. This example does not show how to display communication.


The dining philosophers problem