]> git.baikalelectronics.ru Git - kernel.git/commit
leaking_addresses: cache architecture name
authorTobin C. Harding <me@tobin.cc>
Mon, 19 Feb 2018 02:23:44 +0000 (13:23 +1100)
committerTobin C. Harding <me@tobin.cc>
Fri, 6 Apr 2018 22:50:34 +0000 (08:50 +1000)
commite89a51d6fcdc4914dbbb96ace605b164c3816e36
tree37e73e94625c0f9f6aab110ba9fdebf30d84058c
parent51d18652de6e689d67f40f4f0bf0b121dff64f4e
leaking_addresses: cache architecture name

Currently we are repeatedly calling `uname -m`.  This is causing the
script to take a long time to run (more than 10 seconds to parse
/proc/kallsyms).  We can use Perl state variables to cache the result of
the first call to `uname -m`.  With this change in place the script
scans the whole kernel in under a minute.

Cache machine architecture in state variable.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
scripts/leaking_addresses.pl