lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Nov 2018 18:26:59 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Eric Saint-Etienne <eric.saint.etienne@...cle.com>
Cc:     Linux Kernel <linux-kernel@...r.kernel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.co>,
        Ingo Molnar <mingo@...hat.com>, Jiri Olsa <jolsa@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Shaggy <dave.kleikamp@...cle.com>,
        David Aldridge <david.j.aldridge@...cle.com>,
        Rob Gardner <rob.gardner@...cle.com>,
        Eric Saint-Etienne <eric.saintetienne@...il.com>
Subject: Re: [PATCH] perf symbols: fix slowness due to -ffunction-section

Em Wed, Nov 21, 2018 at 09:51:19AM -0800, Eric Saint-Etienne escreveu:
> Perf can take minutes to parse an image when -ffunction-section is used.
> This is especially true with the kernel image when it is compiled this way,
> which is the arm64 default since the patcheset "Enable deadcode elimination
> at link time".
> 
> Perf organize maps using a rbtree. Whenever perf finds a new symbols, it
> first searches this rbtree for the map it belongs to, by strcmp()'aring
> section names.  When it finds the map with the right name, it uses it to
> add the symbol. With a usual image there aren't so many maps but when using
> -ffunction-section there's basically one map per function.
> With the kernel image that's north of 40,000 maps. For most symbols perf
> has to parses the entire rbtree to eventually create a new map and add it.
> Consequently perf spends most of the time browsing a rbtree that keeps
> getting larger.
> 
> This performance fix introduces a secondary rbtree that indexes maps based
> on the section name.
> 
> Signed-off-by: Eric Saint-Etienne <eric.saint.etienne@...cle.com>
> Reviewed-by: Dave Kleikamp <dave.kleikamp@...cle.com>
> Reviewed-by: David Aldridge <david.aldridge@...cle.com>
> Reviewed-by: Rob Gardner <rob.gardner@...cle.com>

Looks sane, thanks to the multiple reviewers, really appreciated,

Applied.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ