* | |->time (LttTime)
* | |->tsc (LttCycleCount --> uint64)
* | |->fields
- * | |->"event name"
- * | |->"field name"
- * | |->"sub-field name"
- * | |->...
- * | |->"leaf-field name" (field type)
+ * | |->"facility_name
+ * | |->"event name"
+ * | |->"field name"
+ * | |->"sub-field name"
+ * | |->...
+ * | |->"leaf-field name" (field type)
* |->tracefile
* | |->name (String, converted to GQuark)
* |->trace
* event.category
* event.time
* event.tsc
+ * event.field
*/
g_string_free(f,TRUE);
f=g_ptr_array_remove_index(fp,0);
else if(!g_strcasecmp(f->str,"tsc") ) {
se->field = LTTV_FILTER_EVENT_TSC;
}
- else { /* core.xml specified options */
+ else if(!g_strcasecmp(f->str,"field") ) {
se->field = LTTV_FILTER_EVENT_FIELD;
+
+ } else {
+ g_warning("Unknown event filter subtype %s", f->str);
}
} else {
g_string_free(f,TRUE);
case LTTV_FILTER_STATE_EX_SUBMODE:
case LTTV_FILTER_STATE_P_STATUS:
// se->value.v_string = value;
- se->value.v_uint32 = g_quark_from_string(value);
+ se->value.v_quark = g_quark_from_string(value);
g_free(value);
break;
/*
*/
gboolean lttv_apply_op_eq_quark(const gpointer v1, LttvFieldValue v2) {
GQuark* r = (GQuark*) v1;
-// g_print("v1:%i v2:%i\n",*r,v2.v_uint32);
- return (*r == v2.v_uint32);
+ return (*r == v2.v_quark);
}
/**
*/
gboolean lttv_apply_op_ne_quark(const gpointer v1, LttvFieldValue v2) {
GQuark* r = (GQuark*) v1;
- return (*r != v2.v_uint32);
+ return (*r != v2.v_quark);
}
case LTTV_FILTER_STATE_CPU:
if(context == NULL) return TRUE;
else {
- /* FIXME: not sure of that one Mathieu : fixed.*/
- // GQuark quark = ((LttvTracefileState*)context)->cpu_name;
- // return se->op((gpointer)&quark,v);
if(state == NULL) return TRUE;
else return se->op((gpointer)&state->cpu,v);
}
LTTV_FILTER_EVENT_CATEGORY, /**< FIXME: not implemented */
LTTV_FILTER_EVENT_TIME, /**< event.time (double) */
LTTV_FILTER_EVENT_TSC, /**< event.tsc (double) */
- LTTV_FILTER_EVENT_FIELD, /**< dynamic field, specified in core.xml */
+ LTTV_FILTER_EVENT_FIELD, /**< dynamic field, specified in facility */
LTTV_FILTER_UNDEFINED /**< undefined field */
};
* 'operators' functions
*/
union _LttvFieldValue {
+ GQuark v_quark; /**< GQuark */
guint64 v_uint64; /**< unsigned int of 64 bytes */
guint32 v_uint32; /**< unsigned int of 32 bytes */
guint16 v_uint16; /**< unsigned int of 16 bytes */
tcd->fac_path_label = gtk_label_new("path to facilities:");
gtk_widget_show (tcd->fac_path_label);
tcd->fac_path_entry = gtk_entry_new();
- gtk_entry_set_text(GTK_ENTRY(tcd->fac_path_entry),PACKAGE_DATA_DIR "/" PACKAGE "/facilities");
+ gtk_entry_set_text(GTK_ENTRY(tcd->fac_path_entry),PACKAGE_DATA_DIR "/" "ltt-control" "/facilities");
gtk_widget_set_size_request(tcd->fac_path_entry, 250, -1);
gtk_widget_show (tcd->fac_path_entry);
gtk_table_attach( GTK_TABLE(tcd->main_box),tcd->fac_path_label,0,2,14,15,GTK_FILL,GTK_FILL,2,2);
/* Insert the hooks before and after each trace and tracefile, and for each
event. Print a global header. */
-/*
- * YET TO BE ANSWERED !
- * - why does this module need dependency with batchAnalysis ?
- */
-
/*
* TODO
* - specify wich hook function will be used to call the core filter
g_print("event.category (string)\n");
g_print("event.time (double)\n");
g_print("event.tsc (integer)\n");
+ g_print("event.field.facility_name.event_name.field_name.subfield_name (field_type)\n");
g_print("tracefile.name (string)\n");
g_print("trace.name (string)\n");
g_print("state.pid (integer)\n");