update genevent
[lttv.git] / genevent / genevent.h
index 8c2faccd36e56031692747ad3dcb248fe614b2e6..4515c7586cb788bac6b494b112a9dbe0a79aa48d 100644 (file)
@@ -1,12 +1,66 @@
+/******************************************************************************
+ * Genevent
+ *
+ * Event generator. XML to logging C code converter.
+ *
+ * Supports : 
+ *     - C Alignment
+ *     - C types : struct, union, enum, basic types.
+ *     - Architectures : LP32, ILP32, ILP64, LLP64, LP64.
+ *
+ * Additionnal structures supported :
+ *     - embedded variable size strings
+ *     - embedded variable size arrays
+ *     - embedded variable size sequences
+ * 
+ * Notes :
+ * (1)
+ * enums are limited to integer type, as this is what is used in C. Note,
+ * however, that ISO/IEC 9899:TC2 specify that the type of enum can be char,
+ * unsigned int or int. This is implementation defined (compiler). That's why we
+ * add a check for sizeof enum.
+ *
+ * (2)
+ * Because of archtecture defined type sizes, we need to ask for ltt_align
+ * (which gives the alignment) by passing basic types, not their actual sizes.
+ * It's up to ltt_align to determine sizes of types.
+ *
+ * Note that, from
+ * http://www.usenix.org/publications/login/standards/10.data.html
+ * (Andrew Josey <a.josey@opengroup.org>) :
+ *
+ *     Data Type       LP32    ILP32   ILP64   LLP64   LP64
+ *     char    8       8       8       8       8
+ *     short   16      16      16      16      16
+ *     int32                   32
+ *     int     16      32      64      32      32
+ *     long    32      32      64      32      64
+ *     long long (int64)                                       64
+ *     pointer 32      32      64      64      64
+ *
+ * With these constraints :
+ * sizeof(char) <= sizeof(short) <= sizeof(int)
+ *          <= sizeof(long) = sizeof(size_t)
+ * 
+ * and therefore sizeof(long) <= sizeof(pointer) <= sizeof(size_t)
+ *
+ * Which means we only have to remember which is the biggest type in a structure
+ * to know the structure's alignment.
+ */
+
+
+
+/* Code printing */
+
+/* Type size checking */
+int print_check(int fd);
+
+
+/* Print types */
+int print_types(int fd);
+
+/* Print events */
+int print_events(int fd);
 
-void generateFile(char * file);
-void generateHfile(FILE *);
-void generateCfile(FILE * fp, char * facName);
-void generateTypeDefs(FILE *, char *facName);
-void generateEnumEvent(FILE * fp,char * facName, int * nbEvent, unsigned long checksum);
-void generateStructFunc(FILE * fp, char * facName, unsigned long checksum);
-void generateLoaderfile(FILE * fp, char * facName, int nbEvent, unsigned long checksum, char *capname);
-void generateEnumDefinition(FILE * fp, type_descriptor * fHead);
-char * getTypeStr(type_descriptor * td);
 
 
This page took 0.023177 seconds and 4 git commands to generate.