use enums arch specific for syscall names
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 17 Dec 2005 23:43:21 +0000 (23:43 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 17 Dec 2005 23:43:21 +0000 (23:43 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1427 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/facilities/Makefile.am
ltt/branches/poly/facilities/kernel.xml
ltt/branches/poly/ltt/parser.c
ltt/branches/poly/lttv/lttv/state.c
ltt/branches/poly/lttv/lttv/state.h
ltt/branches/poly/lttv/lttv/stats.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c

index e10a3da6c005de94a62cac360b9d63aee78ea6ab..36521458452402c3213243ec99639d547ad6541e 100644 (file)
@@ -3,6 +3,7 @@ EXTRA_DIST =  \
 core.xml \
 fs.xml \
 ipc.xml \
+asm_i386_kernel.xml \
 kernel.xml \
 memory.xml \
 network.xml \
@@ -15,6 +16,7 @@ facilities_DATA = \
 core.xml \
 fs.xml \
 ipc.xml \
+asm_i386_kernel.xml \
 kernel.xml \
 memory.xml \
 network.xml \
index 19285c56d079068e32789eb87d1000bc2fe96a3a..84d39e4a278b8a62e3d1c1ff846794cd91199f79 100644 (file)
     </enum>
   </type>
 
-  <event name=syscall_entry>
-    <description>System call entry</description>
-    <field name="syscall_id"> <description>Syscall entry number in entry.S</description> <uint size=1/> </field>
-    <field name="address"> <description>Address from which call was made</description> <pointer/> </field>
-  </event>
-       
-       <event name=syscall_exit>
-    <description>System call exit</description>
-  </event>
-       
   <event name=trap_entry>
     <description>Entry in a trap</description>
     <field name="trap_id"> <description>Trap number</description> <long/> </field>
index 921c559ae5fed7e131107fc14f79db99d33b6fce..b8f2a6a2fc03d924847d5dda9d045c8f0c873f2b 100644 (file)
@@ -741,7 +741,7 @@ type_descriptor_t *parseType(parse_file_t *in, type_descriptor_t *inType,
     while(strcmp("label",token) == 0){
       int *label_value = malloc(sizeof(int));
       
-      str   = allocAndCopy(getNameAttribute(in));      
+      str   = allocAndCopy(getNameAttribute(in));
       token = getValueStrAttribute(in);
       
        sequence_push(&(t->labels),str);
@@ -972,7 +972,8 @@ char *getName(parse_file_t * in)
   char *token;
 
   token = getToken(in);
-  if(in->type != NAME) in->error(in,"Name token was expected");
+  // Optional descriptions
+       // if(in->type != NAME) in->error(in,"Name token was expected");
   return token;
 }
 
@@ -1154,11 +1155,11 @@ char *getToken(parse_file_t * in)
         if(pos == BUFFER_SIZE) in->error(in, "number token too large");
         in->type = NUMBER;
       }    
-      else if(isalpha(car)) {
+      else if(isalnum(car) || car == '_' || car == '-') {
         in->buffer[0] = car;
         pos = 1;
         while((car = getc(fp)) != EOF && pos < BUFFER_SIZE) {
-          if(!(isalnum(car) || car == '_')) {
+          if(!(isalnum(car) || car == '_' || car == '-')) {
             ungetc(car,fp);
             break;
           }
index 22c1d3bf6ed6c3401646a8bbeff81f9f60dec8d4..0721f7c9ba92eceb2b8166c0f65b95e237dd6ca0 100644 (file)
@@ -35,6 +35,7 @@
 
 GQuark
     LTT_FACILITY_KERNEL,
+    LTT_FACILITY_ASM_I386_KERNEL,
     LTT_FACILITY_PROCESS,
     LTT_FACILITY_FS;
 
@@ -768,7 +769,7 @@ create_name_tables(LttvTraceState *tcs)
   }
 #endif //0
   if(lttv_trace_find_hook(tcs->parent.t,
-      LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+      LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
       LTT_FIELD_SYSCALL_ID, 0, 0,
       NULL, NULL, &h))
     return;
@@ -1437,13 +1438,13 @@ void lttv_state_add_event_hooks(LttvTracesetState *self)
     hooks = g_array_set_size(hooks, 11);
 
     ret = lttv_trace_find_hook(ts->parent.t,
-        LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+        LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
         LTT_FIELD_SYSCALL_ID, 0, 0,
         syscall_entry, NULL, &g_array_index(hooks, LttvTraceHook, 0));
     g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.t,
-        LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT,
+        LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT,
         0, 0, 0,
         syscall_exit, NULL, &g_array_index(hooks, LttvTraceHook, 1));
     g_assert(!ret);
@@ -2155,6 +2156,7 @@ static void module_init()
 
   
   LTT_FACILITY_KERNEL     = g_quark_from_string("kernel");
+  LTT_FACILITY_ASM_I386_KERNEL     = g_quark_from_string("asm_i386_kernel");
   LTT_FACILITY_PROCESS    = g_quark_from_string("process");
   LTT_FACILITY_FS    = g_quark_from_string("fs");
 
index 69f35edf1867f8cfcfa4c67099d46475332094a4..c6a373ab87cd51804c9de38f078decd419e58954 100644 (file)
@@ -57,6 +57,7 @@
 
 extern GQuark
     LTT_FACILITY_KERNEL,
+    LTT_FACILITY_ASM_I386_KERNEL,
     LTT_FACILITY_PROCESS,
     LTT_FACILITY_FS;
 
index 6416e3001b3e350cf60a2f48152917c6160227a2..d4321bce7ed80c4b955b3e442c68993e355195a0 100644 (file)
@@ -808,14 +808,14 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
     g_array_set_size(hooks, 7);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
-        LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+        LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
         LTT_FIELD_SYSCALL_ID, 0, 0,
         before_syscall_entry, NULL, 
         &g_array_index(hooks, LttvTraceHook, 0));
     g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
-        LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT,
+        LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT,
         0, 0, 0,
         before_syscall_exit, NULL, 
         &g_array_index(hooks, LttvTraceHook, 1));
@@ -862,14 +862,14 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
     g_array_set_size(hooks, 9);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
-        LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+        LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
         LTT_FIELD_SYSCALL_ID, 0, 0,
         after_syscall_entry, NULL, 
         &g_array_index(hooks, LttvTraceHook, 0));
     g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
-        LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT,
+        LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT,
         0, 0, 0,
         after_syscall_exit, NULL, 
         &g_array_index(hooks, LttvTraceHook, 1));
index 94f810899a61c0c34b987b8efa0925df6455f004..b22931d69a8cd5e7de9fe7560d979ef965fd42b9 100644 (file)
@@ -224,7 +224,7 @@ void drawing_data_request(Drawing_t *drawing,
       /* before hooks */
       
       ret = lttv_trace_find_hook(ts->parent.t,
-          LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
+          LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_ENTRY,
           LTT_FIELD_SYSCALL_ID, 0, 0,
           before_execmode_hook,
           events_request,
@@ -232,7 +232,7 @@ void drawing_data_request(Drawing_t *drawing,
       g_assert(!ret);
 
       ret = lttv_trace_find_hook(ts->parent.t,
-          LTT_FACILITY_KERNEL, LTT_EVENT_SYSCALL_EXIT,
+          LTT_FACILITY_ASM_I386_KERNEL, LTT_EVENT_SYSCALL_EXIT,
           0, 0, 0,
           before_execmode_hook,
           events_request,
This page took 0.030067 seconds and 4 git commands to generate.