[optimize]delayed allocation for maat_compile_state

This commit is contained in:
liuwentan
2023-06-01 14:47:20 +08:00
parent 64ac2dd7da
commit c65ab26536
5 changed files with 116 additions and 89 deletions

View File

@@ -2147,6 +2147,10 @@ void maat_compile_state_update(int vtable_id, struct maat_item *hit_items,
hit_cnt = MAX_SCANNER_HIT_GROUP_NUM;
}
if (NULL == state->compile_state) {
state->compile_state = maat_compile_state_new(state->thread_id);
}
for (i = 0; i < hit_cnt; i++) {
maat_compile_state_update_hit_path(state->compile_state, hit_items[i].item_id,
hit_items[i].group_id, vtable_id, state->scan_cnt, i);