]> sourceware.org Git - systemtap.git/commit
(PR14571 partial fix) For dyninst, use TLS for map and stat data.
authorDavid Smith <dsmith@redhat.com>
Fri, 21 Sep 2012 20:13:28 +0000 (15:13 -0500)
committerDavid Smith <dsmith@redhat.com>
Fri, 21 Sep 2012 20:13:28 +0000 (15:13 -0500)
commite3575828e07be265fd6628a2c58103bf2fdf7535
tree14fe95ddc96806a5a949dfe3979d1dc7c921e5c3
parent5c3e49ce97d57cc97e2412e9fb7a03e6d0093ad0
(PR14571 partial fix) For dyninst, use TLS for map and stat data.

* runtime/dyninst/tls_data.c: New file.
* runtime/stat.c (struct _Stat): Add a tls_data_container_t structure.
  (_stp_stat_tls_object_init): New function.
  (_stp_stat_tls_object_free): Ditto.
  (_stp_stat_init): Instead of directly allocating percpu data, for
  dyninst set up tls data to be created when accessed by calling
  _stp_tls_data_container_init().
  (_stp_stat_del): For dyninst, call _stp_tls_data_container_cleanup() to
  remove all the tls data.
  (_stp_stat_add): For dyninst, get the proper tls stat object.
  (_stp_stat_get_cpu): Deleted unused function.
  (_stp_stat_get): For dyninst, get the proper tls stat objects.
  (_stp_stat_clear): For dyninst, clear the stat in each thread's tls data.
* runtime/stat.h (struct stat_data): Add a tls_data_object_t structure.
* runtime/map.c (_stp_map_tls_object_init): New function.
  (_stp_map_tls_object_free): Ditto.
  (_stp_pmap_new): Instead of directly allocating percpu data, for dyninst
  set up tls data to be created when accessed by calling
  _stp_tls_data_container_init().
  (_stp_pmap_clear): For dyninst, clear the map in each thread's tls data.
  (_stp_pmap_del): For dyninst, call _stp_tls_data_container_cleanup() to
  remove all the tls data.
  (_stp_pmap_agg): Add dyninst support.
* runtime/map.h (struct map_root): Add a tls_data_object_t structure.
  (struct pmap): Add a tls_data_container_t structure.
* runtime/map-stat.c (_stp_hstat_tls_object_init): New function.
  (_stp_pmap_new_hstat_linear): For dyninst, override the standard tls
  data object init function with _stp_hstat_tls_object_init(), which knows
  how to handle hstats.
  (_stp_pmap_new_hstat_log): Ditto.
* runtime/pmap-gen.c (_stp_pmap_tls_object_init): New function.
  (_stp_pmap_new): For dyninst, override the standard tls
  data object init function with _stp_pmap_tls_object_init(), which knows
  how to handle pmaps.
  (_stp_pmap_set): For dyninst, get the proper tls pmap object.
  (_stp_pmap_add): Ditto.
  (_stp_pmap_get_cpu): Ditto.
  (_stp_pmap_get): Ditto.
  (_stp_pmap_del): Ditto.
* runtime/dyninst/linux_defs.h: Added container_of(), list_entry(),
  list_for_each_entry(), and list_for_each_entry_safe().
runtime/dyninst/linux_defs.h
runtime/dyninst/tls_data.c [new file with mode: 0644]
runtime/map-stat.c
runtime/map.c
runtime/map.h
runtime/pmap-gen.c
runtime/stat.c
runtime/stat.h
This page took 0.029146 seconds and 5 git commands to generate.