update compat
[lttv.git] / genevent / README
CommitLineData
bf431ad1 1
2Mathieu Desnoyers -- September 2005
3
3888436c 4The 'genevent' program parses event descriptions and generates
5the inline functions to record events in the kernel.
6
7Right now, the program can only parse simple structure, if a
8structure has a nested structure, it will not work.
9
1b5edbe5 10Genevent will soon go through a rewrite, but for now, the strings should be put
294a75a8 11*** AT THE END *** of a structure : they will be put there anyways.
1b5edbe5 12
3888436c 13There are several files in the directory:
14 genevent.c, genevent.h, crc32.tab, parser.c and parser.h
15
16In fact, crc32.tab, parser.c and parser.h are the same files as
17those in LTT library.
18
19'core.xml' is an example event description file.
20
bf431ad1 21Here is a brief description of how to use genevent.
22
23make
24make install
25
26
27* Add new events to the kernel with genevent
28
29su -
30cd /usr/local/share/LinuxTraceToolkitViewer/facilities
31cp process.xml yourfacility.xml
32 * edit yourfacility.xml to fit your needs.
33cd /tmp
34/usr/local/bin/genevent /usr/local/share/LinuxTraceToolkitViewer/yourfacility.xml
35cp ltt-facility-yourfacility.h ltt-facility-id-yourfacility.h \
36 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2/include/linux/ltt
37cp ltt-facility-loader-yourfacility.c ltt-facility-loader-yourfacility.h \
38 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2/ltt
39 * edit the kernel file you want to instrument
40 - Add #include <linux/ltt/ltt-facility-yourfacility.h> at the beginning
41 of the file.
42 - Add a call to the tracing functions. See their names and parameters in
43 /usr/src/linux-2.6.12-rc4-mm2-lttng-0.2/include/linux/ltt/ltt-facility-yourfacility.h
44
45
This page took 0.029846 seconds and 4 git commands to generate.