add func instrumentation
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 6 Mar 2006 23:44:48 +0000 (23:44 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 6 Mar 2006 23:44:48 +0000 (23:44 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1591 04897980-b3bd-0310-b5e0-8ef037075253

genevent-new/genevent.c
genevent-new/parser.c
genevent-new/parser.h

index 3e48840ebc1156462d403b49c1ed63c525f10e69..b912104609e135ac9e5e7cad1c907e8078d74ee1 100644 (file)
@@ -1588,10 +1588,16 @@ int print_event_logging_function(char *basename, facility_t *fac,
 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;
index ba331e9edb88ae9da88a97545bb05c94e8f81c59..28ebaeea9dba2e5a99eac16c404be0f62d81d000 100644 (file)
@@ -248,6 +248,7 @@ void getEventAttributes(parse_file_t *in, event_t *ev)
   ev->per_trace = 0;
   ev->per_tracefile = 0;
   ev->param_buffer = 0;
+       ev->no_instrument_function = 0;
 
   while(1) {
     token = getToken(in); 
@@ -268,6 +269,8 @@ void getEventAttributes(parse_file_t *in, event_t *ev)
       ev->per_tracefile = 1;
     } else if(!strcmp("param_buffer", token)) {
                        ev->param_buffer = 1;
+               } else if(!strcmp("no_instrument_function", token)) {
+                       ev->no_instrument_function = 1;
                }
 
   }
index 7c579e00c6e61ce989c6e5e004f6fdfcfe75ac1d..ec360f8444ce5b3466f49abb3004282427961a25 100644 (file)
@@ -135,6 +135,7 @@ typedef struct _event {
   int  per_trace;   /* Is the event able to be logged to a specific trace ? */
   int  per_tracefile;  /* Must we log this event in a specific tracefile ? */
        int param_buffer; /* For userspace tracing : takes a buffer as parameter? */
+       int no_instrument_function;
 } event_t;
 
 typedef struct _facility {
This page took 0.025931 seconds and 4 git commands to generate.