0.6.0preX update
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 27 Sep 2006 23:45:54 +0000 (23:45 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 27 Sep 2006 23:45:54 +0000 (23:45 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2139 04897980-b3bd-0310-b5e0-8ef037075253

genevent/genevent.c
genevent/parser.c
genevent/parser.h

index 8f898e7f93df3c0a338d1d12fc508933ab42803d..766e57c53b8e9e64dfa7cd4ef416d6c83b17fd46 100644 (file)
@@ -1401,12 +1401,14 @@ int print_event_logging_function(char *basename, facility_t *fac,
                fprintf(fd, "void");
        }
        fprintf(fd,")\n");
+#if 0
        fprintf(fd, 
-                       "#if (!defined(CONFIG_LTT) || !defined(CONFIG_LTT_FACILITY_%s))\n",
-                       fac->capname);
+                       "#if (!defined(CONFIG_LTT) || (!defined(CONFIG_LTT_FACILITY_%s) && !defined(CONFIG_LTT_FACILITY_%s_MODULE)))\n",
+                       fac->capname, fac->capname);
        fprintf(fd, "{\n");
        fprintf(fd, "}\n");
        fprintf(fd,"#else\n");
+#endif //0
        fprintf(fd, "{\n");
        /* Print the function variables */
        print_tabs(1, fd);
@@ -1638,8 +1640,10 @@ int print_event_logging_function(char *basename, facility_t *fac,
        fprintf(fd, "preempt_enable_no_resched();\n");
 
        fprintf(fd, "}\n");
-       fprintf(fd, "#endif //(!defined(CONFIG_LTT) || !defined(CONFIG_LTT_FACILITY_%s))\n\n",
-                       fac->capname);
+#if 0
+       fprintf(fd, "#endif //(!defined(CONFIG_LTT) || (!defined(CONFIG_LTT_FACILITY_%s) && !defined(CONFIG_LTT_FACILITY_%s_MODULE)))\n\n",
+                       fac->capname, fac->capname);
+#endif //0
        return 0;
 }
 
@@ -1867,7 +1871,7 @@ int print_event_logging_function_user_generic(char *basename, facility_t *fac,
 
 do_syscall:
        print_tabs(2, fd);
-       fprintf(fd, "ret = ltt_trace_generic(ltt_facility_%s_%X, event_%s_%s, buffer, reserve_size, LTT_BLOCKING);\n", fac->name, fac->checksum, fac->name, event->name);
+       fprintf(fd, "ret = ltt_trace_generic(ltt_facility_%s_%X, event_%s_%s, buffer, reserve_size, LTT_BLOCKING, %u);\n", fac->name, fac->checksum, fac->name, event->name, event->high_priority);
 
        print_tabs(1, fd);
        fprintf(fd, "}\n\n");
@@ -2167,12 +2171,12 @@ void print_log_header_head(facility_t *fac, FILE *fd)
        fprintf(fd, "#define _LTT_FACILITY_%s_H_\n\n", fac->capname);
        fprintf(fd, "#include <linux/types.h>\n");
        if(!fac->arch)
-               fprintf(fd, "#include <linux/ltt/ltt-facility-id-%s.h>\n", fac->name);
+               fprintf(fd, "#include <ltt/ltt-facility-id-%s.h>\n", fac->name);
        else
-               fprintf(fd, "#include <asm/ltt/ltt-facility-id-%s_%s.h>\n",
+               fprintf(fd, "#include <ltt/ltt-facility-id-%s_%s.h>\n",
                                fac->name,
                                fac->arch);
-       fprintf(fd, "#include <linux/ltt-core.h>\n");
+       fprintf(fd, "#include <ltt/ltt-tracer.h>\n");
        fprintf(fd, "\n");
 }
 
@@ -2496,10 +2500,10 @@ int print_loader_header(facility_t *fac)
   fprintf(fd, "#ifdef CONFIG_LTT\n\n");
   fprintf(fd,"#include <linux/ltt-facilities.h>\n");
        if(!fac->arch)
-         fprintf(fd,"#include <linux/ltt/ltt-facility-id-%s.h>\n\n",
+         fprintf(fd,"#include <ltt/ltt-facility-id-%s.h>\n\n",
                                fac->name);
        else
-         fprintf(fd,"#include <asm/ltt/ltt-facility-id-%s_%s.h>\n\n",
+         fprintf(fd,"#include <ltt/ltt-facility-id-%s_%s.h>\n\n",
                                fac->name,
                                fac->arch);
   fprintf(fd,"ltt_facility_t\tltt_facility_%s;\n", fac->name);
@@ -2561,7 +2565,7 @@ int print_loader_header_user(facility_t *fac)
          fprintf(fd,"#include <ltt/ltt-facility-id-%s.h>\n\n",
                                fac->name);
        else
-         fprintf(fd,"#include <asm/ltt/ltt-facility-id-%s_%s.h>\n\n",
+         fprintf(fd,"#include <ltt/ltt-facility-id-%s_%s.h>\n\n",
                                fac->name,
                                fac->arch);
   fprintf(fd,"ltt_facility_t\tltt_facility_%s;\n", fac->name);
index 2d6b27d5060718394983471a5738c62007f260fc..0ac6f5454da87294dc2f28f3714bb44bd35d5ac0 100644 (file)
@@ -269,7 +269,8 @@ 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;
+  ev->no_instrument_function = 0;
+  ev->high_priority = 0;
 
   while(1) {
     token = getToken(in); 
@@ -285,28 +286,30 @@ void getEventAttributes(parse_file_t *in, event_t *ev)
       else if(car == '\"') ev->name = allocAndCopy(getQuotedString(in));
       else ev->name = allocAndCopy(getName(in));
     } else if(!strcmp("scope", token)) {
-                       getEqual(in);
-                       car = seekNextChar(in);
-                       if(car == EOF) in->error(in,"scope was expected");
+      getEqual(in);
+      car = seekNextChar(in);
+      if(car == EOF) in->error(in,"scope was expected");
       else if(car == '\"') token = getQuotedString(in);
       else token = getName(in);
-                       if(!strcmp(token, "trace")) ev->per_trace = 1;
-                       else if(!strcmp(token, "tracefile")) ev->per_tracefile = 1;
-         } else if(!strcmp("param", token)) {
-                       getEqual(in);
-                       car = seekNextChar(in);
-                       if(car == EOF) in->error(in,"parameter type was expected");
+      if(!strcmp(token, "trace")) ev->per_trace = 1;
+      else if(!strcmp(token, "tracefile")) ev->per_tracefile = 1;
+    } else if(!strcmp("param", token)) {
+      getEqual(in);
+      car = seekNextChar(in);
+      if(car == EOF) in->error(in,"parameter type was expected");
       else if(car == '\"') token = getQuotedString(in);
       else token = getName(in);
-                       if(!strcmp(token, "buffer")) ev->param_buffer = 1;
-               } else if(!strcmp("attribute", token)) {
-                       getEqual(in);
-                       car = seekNextChar(in);
-                       if(car == EOF) in->error(in,"attribute was expected");
+      if(!strcmp(token, "buffer")) ev->param_buffer = 1;
+    } else if(!strcmp("attribute", token)) {
+      getEqual(in);
+      car = seekNextChar(in);
+      if(car == EOF) in->error(in,"attribute was expected");
       else if(car == '\"') token = getQuotedString(in);
       else token = getName(in);
-                       if(!strcmp(token, "no_instrument_function"))
-                               ev->no_instrument_function = 1;
+      if(!strcmp(token, "no_instrument_function"))
+        ev->no_instrument_function = 1;
+      else if(!strcmp(token, "high_priority"))
+        ev->high_priority = 1;
     }
   }
 }
index a447d6db03c3cca91b1bbc727cd8911aa1959bfb..8fd75743c96fe35c0dcb19890a885f2026db996e 100644 (file)
@@ -136,6 +136,7 @@ typedef struct _event {
   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;
+       int high_priority;
 } event_t;
 
 typedef struct _facility {
This page took 0.027802 seconds and 4 git commands to generate.