X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=genevent-new%2Fgenevent.c;h=9113a11ceec1d968ed2941ad667be46d86a60e8b;hb=70f46ac34d0f9f1f92f96c6d970e8278daa3308a;hp=9c496debf8936d01e0737b443c07ae28b0f797de;hpb=8f78c30fa8dda13373f1ba664620c65153c9558f;p=lttv.git diff --git a/genevent-new/genevent.c b/genevent-new/genevent.c index 9c496deb..9113a11c 100644 --- a/genevent-new/genevent.c +++ b/genevent-new/genevent.c @@ -411,7 +411,8 @@ int print_type_declaration(type_descriptor_t * td, FILE *fd, unsigned int tabs, fprintf(fd, " {\n"); for(unsigned int i=0;ilabels.position;i++){ print_tabs(1, fd); - fprintf(fd, "LTTNG_%s", ((char*)(td->labels.array[i]))); + fprintf(fd, "LTTNG_%s = %d", ((char*)td->labels.array[i]), + (*(int*)td->labels_values.array[i])); fprintf(fd, ",\n"); } fprintf(fd, "};\n"); @@ -1198,7 +1199,7 @@ int print_type_write_fct(type_descriptor_t * td, FILE *fd, unsigned int tabs, print_tabs(1, fd); fprintf(fd, "/* Realign the *to_base on arch size, set *to to 0 */\n"); print_tabs(1, fd); - fprintf(fd, "*to = ltt_align(*to, sizeof(void *));\n"); + fprintf(fd, "*to += ltt_align(*to, sizeof(void *));\n"); print_tabs(1, fd); fprintf(fd, "*to_base = *to_base+*to;\n"); print_tabs(1, fd); @@ -1222,7 +1223,7 @@ int print_type_write_fct(type_descriptor_t * td, FILE *fd, unsigned int tabs, print_tabs(1, fd); fprintf(fd, "/* Realign the *to_base on arch size, set *to to 0 */\n"); print_tabs(1, fd); - fprintf(fd, "*to = ltt_align(*to, sizeof(void *));\n"); + fprintf(fd, "*to += ltt_align(*to, sizeof(void *));\n"); print_tabs(1, fd); fprintf(fd, "*to_base = *to_base+*to;\n"); print_tabs(1, fd); @@ -1497,6 +1498,7 @@ int print_event_logging_function(char *basename, facility_t *fac, fprintf(fd, "reserve_size, before_hdr_pad, tsc);\n"); print_tabs(2, fd); fprintf(fd, "*to_base += before_hdr_pad + after_hdr_pad + header_size;\n"); + fprintf(fd, "\n"); /* write data. */