[apparmor] [Patch 0/4] change accept node handling during expr tree set
John Johansen
john.johansen at canonical.com
Tue Jun 23 20:04:04 UTC 2015
On 06/22/2015 10:59 AM, John Johansen wrote:
> This series of patches changes the way accept nodes are generated
> and the expression tree is set-up around them. It is a start to the
> backend refactoring and cleanup, and provides a nice little performance
> boost in most cases because
> 1. It reduces the number of accept nodes geneted and considered during
> simplification/factoring, and node set building (shorter node sets
> to construct and compare)
> 2. It reduces the number of Alt nodes (used to combine the accept nodes)
> to consider during simplfication, and node set building (agin shorter
> node sets to construct and compare)
> 3. It reduces the number of nodes that must be consider in any given
> simplification pass, by separating out node sets that can't be
> simplified on the right hand simplification/factoring pass.
>
> The performance change is dependent on the profile being parsed, and
> there is no guarentee that it will be faster for all profiles. With that
> being said, I haven't seen any performance regressions+ and some fairly
> nice performance improvements so its worth considering before the rest
> of the backend factoring is done.
>
> Eg. Using a few example profile tests from a local machine, comparing
> against the 2.9 parser in Ubuntu 14.10 against current 2.10 with
> these patches*
>
> profile with tree simplification -O no-expr-simplify
> ------- ----------------------- -------------------
> evince 22% faster 10% faster
> firefox 40% faster 11% faster
> chromium 32% faster 11% faster
> cupsd 35% faster 3% faster
> dnsmasq 12% faster 17% faster
> dhclient 36% faster 5% faster
> klogd 0% 8% faster
>
Adding some stats for arm-hf (bq 4.5)
Times are a cummulative user value for 5 consecutive runs of the parser
against a given profile.
2.10+patch no simple no simple/2.10 2.9.1 no simple no simple/2.9 2.10/2.9 2.10 no s/2.9 no s
chromium 34.07 35.75 104.93% 63.68 39.17 61.51% 86.98% 91.27%
cupsd 6.58 4.09 62.16% 11.97 4.22 35.25% 155.92% 96.92%
dhclient 4.98 3.3 66.27% 9.39 3.56 37.91% 139.89% 92.70%
dnsmasq 2.35 1.38 58.72% 3.74 1.47 39.30% 159.86% 93.88%
evince 79.85 239.55 300.00% 122.25 266.78 218.22% 29.93% 89.79%
firefox 33.64 35.02 104.10% 63.78 38.14 59.80% 88.20% 91.82%
klogd 0.78 0.53 67.95% 1.6 0.63 39.38% 123.81% 84.13%
Ubuntu-core-default 2.21 1.33 60.18% 4.99 1.49 29.86% 148.32% 89.26%
Ubuntu-personal-qml-app 11.08 6.3 56.86% 21.97 6.33 28.81% 175.04% 99.53%
Ubuntu-personal-webapp 17.8 11.8 66.29% 34.41 11.74 34.12% 151.62% 100.51%
So the case for arm-hf is different, for the simplification case the majority of cases regress but evince sees huge improvements. For the no simplification case we see slight performance improvements, and only one minor regression.
More information about the AppArmor
mailing list