diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 29cfa97..1880041 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -226,7 +226,7 @@ int region_compile(_Maat_feather_t*feather, struct Maat_hierarchy_compile_mid* c int scan_ret=0; int i=0; - struct Maat_compile_rule* compile_rule_array[MAX_SCANNER_HIT_NUM]; + struct Maat_compile_rule* compile_rule_array[size]; struct Maat_compile_rule* compile_rule=NULL; int virtual_table_id=0; @@ -247,7 +247,7 @@ int region_compile(_Maat_feather_t*feather, struct Maat_hierarchy_compile_mid* c Maat_hierarchy_compile_mid_udpate(compile_mid, region->region_id, virtual_table_id, region_hit_wraper->Nth_scan, i); } - scan_ret=Maat_hierarchy_region_compile(compile_mid, is_last_region, (void**)compile_rule_array, MAX_SCANNER_HIT_NUM); + scan_ret=Maat_hierarchy_region_compile(compile_mid, is_last_region, (void**)compile_rule_array, size); //Maat_hierarchy is rwlock protected, it always returns non-NULL compile_rule. if(scan_ret>1) { diff --git a/src/entry/Maat_hierarchy.cpp b/src/entry/Maat_hierarchy.cpp index d61acb2..7d36579 100644 --- a/src/entry/Maat_hierarchy.cpp +++ b/src/entry/Maat_hierarchy.cpp @@ -16,11 +16,6 @@ #define module_maat_hierarchy "MAAT_HIERARCHY" -#define TO_CLAUSE_ID(clause_index, compile_id) ((unsigned long long)clause_index<<32|compile_id) -#define TO_CLAUSE_ID_COMPATBILE(vid, gid) ((unsigned long long)vid<<32|gid) -#define TO_LITERAL_ID(vt_id, group_id) ((long long)vt_id<<32|group_id) - - struct Maat_hierarchy_group { @@ -53,17 +48,6 @@ struct Maat_hierarchy_literal_id int group_id; int virtual_table_id; }; -struct Maat_hierarchy_literal_usage_key -{ - int clause_index; - int compile_id; -}; -struct Maat_hierarchy_literal_usage -{ - struct Maat_hierarchy_literal_usage_key literal_usage_key; - char not_flag; - UT_hash_handle hh; -}; struct Maat_hierarchy_literal { @@ -100,10 +84,6 @@ static void _group_vertex_free(struct Maat_hierarchy_group* group) } - - - - struct Maat_hierarchy { pthread_rwlock_t rwlock; @@ -303,7 +283,6 @@ static void Maat_hierarchy_region_free(struct Maat_hierarchy* hier, struct Maat_ } - struct Maat_hierarchy* Maat_hierarchy_new(int thread_num, void* mesa_handle_logger) { struct Maat_hierarchy* hier=ALLOC(struct Maat_hierarchy, 1); @@ -1364,7 +1343,6 @@ int Maat_hierarchy_region_compile(struct Maat_hierarchy_compile_mid* mid, int is pthread_rwlock_rdlock(&hier->rwlock); bool_match_ret=bool_matcher_match(hier->bm, mid->thread_num, (unsigned long long*)utarray_eltptr(mid->_all_hit_clause_array, 0), utarray_len(mid->_all_hit_clause_array), - //mid->all_hit_clause_array, mid->all_hit_clause_cnt, (void**)compile_array, ud_array_sz); for(i=0; i