]> sourceware.org Git - systemtap.git/commit
runtime: Allocate maps in fewer chunks
authorJosh Stone <jistone@redhat.com>
Tue, 27 Nov 2012 21:44:26 +0000 (13:44 -0800)
committerJosh Stone <jistone@redhat.com>
Wed, 5 Dec 2012 21:36:51 +0000 (13:36 -0800)
commitdb45dfde268924419d26af6f5b3c27c0631d110f
treec30abc25145364c3e2694ff77694572b0d8cca0a
parent9fa33c38f901e939fb452e23ff34085684063215
runtime: Allocate maps in fewer chunks

This makes map allocations as more unified chunks, basically just one
big allocation for each map_root.  For pmaps, there's one base
allocation, then the separate map_roots for each cpu and the aggregate.
Fewer chunks means fewer pointers to keep track of, which contributes to
the pointer-free goals of shared-memory stapdyn.

* runtime/*/alloc.c: Add kzalloc_node variants.
* runtime/*/map_runtime.h (struct pmap): Abstract the map_roots with
  plain pointers in kernel or offptr_t in stapdyn.
* runtime/map.h (struct map_root): Make "hashes" a fixed array.
* runtime/map.c (_stp_map_init): No more allocation, just initialize
  fields and insert the nodes into the free pool.
  (_stp_map_normalize_key_size, _stp_map_normalize_data_size): Setup the
  key and data sizes in a uniform way.
  (_stp_map_new): Allocate the map_nodes along with the map_root.
  (_stp_pmap_new): Allocate the base pmap, then _stp_map_new the bits.
  (_stp_map_del, _stp_pmap_del): Deletion is now simpler to match.
* runtime/map-gen.c: Update callers to new abstractions.
* runtime/map-stat.c: Ditto.
* runtime/pmap-gen.c: Ditto.
runtime/dyninst/alloc.c
runtime/dyninst/map_runtime.h
runtime/linux/alloc.c
runtime/linux/map_runtime.h
runtime/map-gen.c
runtime/map-stat.c
runtime/map.c
runtime/map.h
runtime/pmap-gen.c
This page took 0.060713 seconds and 5 git commands to generate.