mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
Speedup transition table compression. This is a basic improvement and
not an algorithmic improvement. It does the same basic algorithm of test until it can insert the data, but instead of only tracking the first free entry (and recomputing it each pass). It tracks all free entries reducing the number of comparisons done and the table grows in size. This may actually result in a small loss on small tables, but is a win for larger tables.
This commit is contained in:
@@ -210,6 +210,8 @@ static void display_optimize(char *command)
|
||||
"no-minimize don't do state minimization\n"
|
||||
"no-hash-part don't hash partitions at start of minimization\n"
|
||||
"no-remove-unreachable don't do unreachable state removal\n"
|
||||
"trans-comp-high try to do extra transition table compression\n"
|
||||
"trans-comp-fast do faster transition table compression\n"
|
||||
,command);
|
||||
}
|
||||
|
||||
@@ -387,6 +389,10 @@ static int process_args(int argc, char *argv[])
|
||||
dfaflags &= ~DFA_CONTROL_NO_HASH_PART;
|
||||
} else if (strcmp(optarg, "no-hash-part") == 0) {
|
||||
dfaflags |= DFA_CONTROL_NO_HASH_PART;
|
||||
} else if (strcmp(optarg, "trans-comp-fast") == 0) {
|
||||
dfaflags &= ~DFA_CONTROL_TRANS_HIGH;
|
||||
} else if (strcmp(optarg, "trans-comp-high") == 0) {
|
||||
dfaflags |= DFA_CONTROL_TRANS_HIGH;
|
||||
} else if (strcmp(optarg, "remove-unreachable") == 0) {
|
||||
dfaflags &= ~DFA_CONTROL_NO_UNREACHABLE;
|
||||
} else if (strcmp(optarg, "no-remove-unreachable") == 0) {
|
||||
|
Reference in New Issue
Block a user