]> sourceware.org Git - libabigail.git/commit
Allow re-using the ELF/DWARF read_context when loading a corpus group
authorDodji Seketeli <dodji@redhat.com>
Wed, 31 May 2017 08:30:23 +0000 (10:30 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 3 Jul 2017 15:45:45 +0000 (17:45 +0200)
commit077b977ce5a780c6b43ceff26880fa84212f3709
tree80f84b571d2c957832dc0fcb7de12c97d5f39361
parentb9a7e99dda2ce4232f8c71ef1d5e4b625a00b84a
Allow re-using the ELF/DWARF read_context when loading a corpus group

Right now, when loading each corpus of a group, a new read_context is
created and destroyed.  That makes thousands of corpora that are
created and destroyed.  Profiling seems to argue that we'd gain in
performance by re-using the first read_context that was created
instead, and re-set it before loading a new corpus.

This is what this patch does.

* include/abg-dwarf-reader.h (reset_read_context): Declare new
function.
* src/abg-dwarf-reader.cc (read_context::elf_paths_): Make this to
be non const.
(read_context::initialize): New function to initialize all data
members.
(read_context::read_context): Use the new read_context::initialize
function, rather than initializing data members 'inline' here.
(reset_read_context): Define a new function to reset a
read_context so that it can be re-used to load a new corpus.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-dwarf-reader.h
src/abg-dwarf-reader.cc
src/abg-tools-utils.cc
This page took 0.034401 seconds and 5 git commands to generate.