From 0ad10e7f28bf28543b8c131eb5a812ebbeb44216 Mon Sep 17 00:00:00 2001 From: pmf Date: Tue, 9 Oct 2007 02:04:31 +0000 Subject: [PATCH] filter.{c,h}: prepare for new infrastructure git-svn-id: http://ltt.polymtl.ca/svn@2618 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/filter.c | 22 ++++------------------ ltt/branches/poly/lttv/lttv/filter.h | 1 - 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/filter.c b/ltt/branches/poly/lttv/lttv/filter.c index 41e2f898..f6275586 100644 --- a/ltt/branches/poly/lttv/lttv/filter.c +++ b/ltt/branches/poly/lttv/lttv/filter.c @@ -217,9 +217,6 @@ 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 @@ -286,7 +283,6 @@ lttv_simple_expression_assign_operator(LttvSimpleExpression* se, LttvExpressionO case LTTV_FILTER_STATE_P_NAME: case LTTV_FILTER_STATE_T_BRAND: case LTTV_FILTER_EVENT_NAME: - case LTTV_FILTER_EVENT_FACILITY: case LTTV_FILTER_STATE_EX_MODE: case LTTV_FILTER_STATE_EX_SUBMODE: case LTTV_FILTER_STATE_P_STATUS: @@ -449,7 +445,6 @@ lttv_simple_expression_assign_value(LttvSimpleExpression* se, char* value) { case LTTV_FILTER_STATE_P_NAME: case LTTV_FILTER_STATE_T_BRAND: case LTTV_FILTER_EVENT_NAME: - case LTTV_FILTER_EVENT_FACILITY: case LTTV_FILTER_STATE_EX_MODE: case LTTV_FILTER_STATE_EX_SUBMODE: case LTTV_FILTER_STATE_P_STATUS: @@ -573,7 +568,6 @@ 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: @@ -2029,18 +2023,10 @@ lttv_filter_tree_parse_branch( case LTTV_FILTER_EVENT_NAME: if(event == NULL) return TRUE; else { - LttEventType* et; - et = ltt_event_eventtype(event); - GQuark quark = ltt_eventtype_name(et); - 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); + struct marker_info *info; + info = marker_get_info_from_id((LttTrace *)trace, event->event_id); + g_assert(info != NULL); + GQuark quark = info->name; return se->op((gpointer)&quark,v); } break; diff --git a/ltt/branches/poly/lttv/lttv/filter.h b/ltt/branches/poly/lttv/lttv/filter.h index 5d2f91c4..49d97981 100644 --- a/ltt/branches/poly/lttv/lttv/filter.h +++ b/ltt/branches/poly/lttv/lttv/filter.h @@ -110,7 +110,6 @@ 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) */ -- 2.34.1