filter by facility
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 7 Sep 2005 19:19:59 +0000 (19:19 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 7 Sep 2005 19:19:59 +0000 (19:19 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1143 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/filter.c
ltt/branches/poly/lttv/lttv/filter.h
ltt/branches/poly/lttv/modules/gui/detailedevents/events.c
ltt/branches/poly/lttv/modules/gui/filter/filter.c
ltt/branches/poly/lttv/modules/text/textFilter.c

index a614909ed7541026948a7669bf952a338257ee4c..e8eec4896b280703ffc4423778570e5e74da5e68 100644 (file)
@@ -31,6 +31,7 @@
  *  LttvTracefileContext{} 
  *  |->event\ 
  *  | |->name (String, converted to GQuark)
+ *  | |->facility (String, converted to GQuark)
  *  | |->category (String, not yet implemented)
  *  | |->time (LttTime)
  *  | |->tsc (LttCycleCount --> uint64)
@@ -207,6 +208,9 @@ lttv_simple_expression_assign_field(GPtrArray* fp, LttvSimpleExpression* se) {
     if(!g_strcasecmp(f->str,"name") ) {
       se->field = LTTV_FILTER_EVENT_NAME;
     }
+    else if(!g_strcasecmp(f->str,"facility") ) {
+      se->field = LTTV_FILTER_EVENT_FACILITY;
+    }
     else if(!g_strcasecmp(f->str,"category") ) {
       /*
        * FIXME: Category not yet functional in lttv
@@ -535,6 +539,7 @@ lttv_struct_type(gint ft) {
             return LTTV_FILTER_STATE;
             break;
         case LTTV_FILTER_EVENT_NAME:
+        case LTTV_FILTER_EVENT_FACILITY:
         case LTTV_FILTER_EVENT_CATEGORY:
         case LTTV_FILTER_EVENT_TIME:
         case LTTV_FILTER_EVENT_TSC:
@@ -1923,7 +1928,15 @@ lttv_filter_tree_parse_branch(
               return se->op((gpointer)&quark,v);
             }
             break;
-            
+         case LTTV_FILTER_EVENT_FACILITY:
+            if(event == NULL) return TRUE;
+            else {
+              LttFacility* fac;
+              fac = ltt_event_facility(event);
+              GQuark quark = ltt_facility_name(fac);
+              return se->op((gpointer)&quark,v);
+            }
+            break;
         case LTTV_FILTER_EVENT_CATEGORY:
             /*
              * TODO: Not yet implemented
index 29a74d9d4fa83f9aea0f314d2d5074902cf207af..fcc2d78c005c635fe7d85290e7c7fa6109b59547 100644 (file)
@@ -109,6 +109,7 @@ enum _LttvFieldType {
   LTTV_FILTER_STATE_P_STATUS,         /**< state.process_status (LttvProcessStatus) */
   LTTV_FILTER_STATE_CPU,              /**< state.cpu (?last_cpu?) */
   LTTV_FILTER_EVENT_NAME,             /**< event.name (char*) */
+  LTTV_FILTER_EVENT_FACILITY,         /**< event.facility (char*) */
   LTTV_FILTER_EVENT_CATEGORY,         /**< FIXME: not implemented */
   LTTV_FILTER_EVENT_TIME,             /**< event.time (double) */
   LTTV_FILTER_EVENT_TSC,              /**< event.tsc (double) */
index 6610522866dcbf5ae3433ce408fd2236d4e964ea..3ae7bbd0afb2fc9acb829f3e66de775c3448e7eb 100644 (file)
@@ -1374,6 +1374,7 @@ static void event_update_selection(EventViewerData *event_viewer_data)
 {
   guint i;
   GPtrArray *positions = event_viewer_data->pos;
+  g_info("event_update_selection");
 
   for(i=0;i<positions->len;i++) {
     LttvTracesetContextPosition *cur_pos = 
@@ -1391,6 +1392,7 @@ static void event_update_selection(EventViewerData *event_viewer_data)
 
 gboolean update_current_time(void * hook_data, void * call_data)
 {
+  g_info("update_current_time");
   EventViewerData *event_viewer_data = (EventViewerData*) hook_data;
   const LttTime * current_time = (LttTime*)call_data;
   LttvTracesetContext * tsc =
@@ -1432,6 +1434,7 @@ gboolean update_current_time(void * hook_data, void * call_data)
 
 gboolean update_current_position(void * hook_data, void * call_data)
 {
+  g_info("update_current_position");
   EventViewerData *event_viewer_data = (EventViewerData*) hook_data;
   const LttvTracesetContextPosition *current_pos =
     (LttvTracesetContextPosition*)call_data;
index fb67b72c77beb4c704403b3a5f640333b1177aeb..23ff43d74d55b1cce7eb2833d94c70020cf16aa5 100644 (file)
@@ -182,6 +182,7 @@ gui_filter(Tab *tab)
   fvd->f_field_options = g_ptr_array_new(); //g_array_new(FALSE,FALSE,16);
   g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new(""));
   g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.name"));
+  g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.facility"));
   g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.category"));
   g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.time"));
   g_ptr_array_add(fvd->f_field_options,(gpointer) g_string_new("event.tsc"));
index 88a5942b0696defd94e9483471a50e6bccad8aa8..7dcca632ae7c53701cf17ee4c5433e90c8d05d57 100644 (file)
@@ -134,6 +134,7 @@ void filter_list_commands(void *hook_data) {
 
   g_print("*** Possible fields ***\n");
   g_print("event.name (string)\n");
+  g_print("event.facility (string)\n");
   g_print("event.category (string)\n");
   g_print("event.time (double)\n");
   g_print("event.tsc (integer)\n");
This page took 0.027235 seconds and 4 git commands to generate.