int print_event_logging_function_user(char *basename, facility_t *fac,
event_t *event, FILE *fd)
{
+ char *attrib;
+ if(event->no_instrument_function) {
+ attrib = "__attribute__((no_instrument_function)) ";
+ } else {
+ attrib = "";
+ }
if(event->param_buffer) {
- fprintf(fd, "static inline int trace_%s_param_buffer(\n", basename);
+ fprintf(fd, "static inline %sint trace_%s_param_buffer(\n", attrib, basename);
} else {
- fprintf(fd, "static inline int trace_%s(\n", basename);
+ fprintf(fd, "static inline %sint trace_%s(\n",attrib, basename);
}
int has_argument = 0;
int has_type_fixed = 0;
fprintf(fd, "static void __attribute__((constructor)) __ltt_user_init(void)\n");
fprintf(fd, "{\n");
fprintf(fd, "\tint err;\n");
+ fprintf(fd, "#ifdef LTT_SHOW_DEBUG\n");
fprintf(fd, "\tprintf(\"LTT : ltt-facility-%s init in userspace\\n\");\n", fac->name);
+ fprintf(fd, "#endif //LTT_SHOW_DEBUG\n");
fprintf(fd, "\n");
fprintf(fd, "\terr = ltt_register_generic(<T_FACILITY_SYMBOL, &facility);\n");
fprintf(fd, "\tLTT_FACILITY_CHECKSUM_SYMBOL = LTT_FACILITY_SYMBOL;\n");
fprintf(fd, "\t\n");
fprintf(fd, "\tif(err) {\n");
+ fprintf(fd, "#ifdef LTT_SHOW_DEBUG\n");
fprintf(fd, "\t\tperror(\"Error in ltt_register_generic\");\n");
+ fprintf(fd, "#endif //LTT_SHOW_DEBUG\n");
fprintf(fd, "\t}\n");
fprintf(fd, "}\n");
fprintf(fd, "\n");