]> sourceware.org Git - systemtap.git/commit
Use a wider cache for simple function lookups
authorJosh Stone <jistone@redhat.com>
Tue, 30 Mar 2010 21:54:39 +0000 (14:54 -0700)
committerJosh Stone <jistone@redhat.com>
Tue, 30 Mar 2010 22:16:35 +0000 (15:16 -0700)
commit4df79aaf86a9b6dfbccc3c51946024a30ba43726
tree970c39eac7b4d55337b82f1bf7ed0e05f6656d64
parent5898b6e1087175bc85e35ba147334fe87e3d7d06
Use a wider cache for simple function lookups

When we have many individual function lookups, like the nearly 1000 with
syscall.*, each one will iterate every CU in the module (M) and then do a
cache lookup in N entries.  That's a thousand MlogN lookups.

We can instead keep the functions in a module-wide map, and then the
complexity is just a thousand logMN lookups.

Before:
  $ ./run-stap -l 'syscall.**' --vp 01 >/dev/null
  Pass 2: analyzed script: 793 probe(s), 11 function(s), 20 embed(s),
  0 global(s) using 245872virt/147304res/78272shr kb,
  in 1390usr/60sys/1448real ms.

After:
  $ ./run-stap -l 'syscall.**' --vp 01 >/dev/null
  Pass 2: analyzed script: 793 probe(s), 11 function(s), 20 embed(s),
  0 global(s) using 246228virt/147616res/78276shr kb,
  in 720usr/60sys/782real ms.

* dwflpp.cxx (dwflpp::iterate_single_function): Do a simple function
  lookup based on a module-wide cache.
  (dwflpp::mod_function_caching_callback): Helper for above.
* tapsets.cxx (dwarf_query::query_module_functions): Query a single
  function from the module-wide cache.
  (dwarf_query::query_module_dwarf): Use above for simple cases.
dwflpp.cxx
dwflpp.h
tapsets.cxx
This page took 0.024998 seconds and 5 git commands to generate.