patch performance optimization from maat4

change some utarray to thread local variable, to reduce the frequency of calloc and free
This commit is contained in:
root
2024-11-14 03:13:06 +00:00
parent 2dfcf103c0
commit df24326470
9 changed files with 155 additions and 79 deletions

View File

@@ -68,7 +68,7 @@ void rule_compile_state_reset(struct rule_compile_state *rule_compile_state);
void rule_compile_state_free(struct rule_compile_state *rule_compile_state,
struct maat *maat_instance, int thread_id);
int rule_compile_state_update(struct rule_compile_state *rule_compile_state, struct maat *maat_inst,
int rule_compile_state_update(struct maat_state *maat_state, struct maat *maat_inst,
const char *attribute_name, int custom_rule_tbl_id, int Nth_scan,
struct maat_item *hit_items, size_t n_hit_item);
@@ -79,7 +79,7 @@ void rule_compile_state_not_logic_update(struct rule_compile_state *rule_compile
struct maat *maat_inst, const char *attribute_name,
int Nth_scan);
size_t rule_compile_state_get_internal_hit_paths(struct rule_compile_state *rule_compile_state,
size_t rule_compile_state_get_internal_hit_paths(struct maat_state *maat_state,
struct rule_runtime *rule_rt,
struct object_group_runtime *object_group_rt,
struct maat_hit_path *hit_path_array,