summaryrefslogtreecommitdiffstats
path: root/runtime/map.h
Commit message (Collapse)AuthorAgeFilesLines
* Fixed PR 11220 by setting MAP_STRING_LENGTH to MAXSTRINGLEN.David Smith2010-01-251-3/+5
| | | | | | * runtime/map.h: Set MAP_STRING_LENGTH to MAXSTRINGLEN so that large strings can be stored in arrays. * testsuite/systemtap.base/array_string.exp: New testcase.
* Use 'static' as much as possibleJosh Stone2009-01-281-15/+15
| | | | | | | | | | This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results.
* 2007-09-12 Martin Hunt <hunt@redhat.com>hunt2007-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * map-stat.c (_stp_map_new_hstat_log): Set buckets to HIST_LOG_BUCKETS. (_stp_pmap_new_hstat_log): Ditto. (_stp_map_new_hstat_linear): Call _stp_stat_calc_buckets(). (_stp_pmap_new_hstat_linear): Ditto. * stat.h (STP_MAX_BUCKETS): Define.. (HIST_LOG_BUCKETS): Define. * stat.c (_stp_stat_init): Call _stp_stat_calc_buckets(). * stat-common.c (_stp_stat_calc_buckets): New function. Common bucket calculation and error reporting code. (_stp_bucket_to_val): New function. (_stp_val_to_bucket): Renamed and now handles negative numbers. (_stp_stat_print_histogram): Handle negative values in log histograms. (__stp_stat_add): Cleanup.. * map-gen.c (_stp_map_new): Remove buckets param for HIST_LOG. * pmap-gen.c (_stp_pmap_new): Ditto.
* 2007-05-29 Frank Ch. Eigler <fche@redhat.com>fche2007-05-291-0/+19
| | | | | | | | PR 2224 * map.h (NEED_MAP_LOCKS): New config macro, defaults to 0. (MAP_GET_CPU, MAP_PUT_CPU): Wrappers, default to ~no-op. * map.c (_stp_pmap_clear,agg): Use them. * pmap-gen.c (_stp_pmap_new,set,add,get_cpu,get,del): Ditto.
* 2005-12-14 Martin Hunt <hunt@redhat.com>hunt2005-12-141-0/+2
| | | | | | | | | | | | | * pmap-gen.c (_stp_pmap_new_*): Initialize lock. (_stp_pmap_set_*): Lock map while in use. (_stp_pmap_add_*): Lock map while in use. (_stp_pmap_get_cpu): Ditto. (_stp_pmap_get): Lock each per-cpu map. * map-gen.c: Define and use NULLRET for a NULL return value. * map.c (_stp_pmap_clear): New function. (_stp_pmap_agg): Lock each per-cpu map as it gets aggregated.
* 2005-12-07 Martin Hunt <hunt@redhat.com>hunt2005-12-071-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR1923 * map.h (struct map_root): Remove membuf. (struct pmap): Define. (PMAP): Declare. * map.c (_stp_map_init): Use kmalloc() to allocate individual nodes instead of using vmalloc() to allocate one big chunk. (_stp_map_new): Use kmalloc. (_stp_pmap_new): Use kmalloc. Return a PMAP. (__stp_map_del): New function. Free all the nodes in a map. (_stp_map_del): Call __stp_map_del() then free map struct. (_stp_pmap_del): Takes a PMAP. Calls __stp_map_del() for each cpu. (_stp_pmap_printn_cpu): Change arg to PMAP. (_stp_pmap_agg): Change arg to PMAP. (_stp_pmap_get_agg): Change arg to PMAP. * map-stat.c (_stp_pmap_new_hstat_linear): Use PMAP instead of MAP. Fix allocations. (_stp_pmap_new_hstat_log): Ditto. * pmap-gen.c Fix all functions to take or return PMAPS instead of MAPS. * alloc.c: Remove everything except kmalloc_node(). All runtime code now uses kmalloc() directly.
* 2005-11-11 Martin Hunt <hunt@redhat.com>hunt2005-11-111-72/+0
| | | | * map.h: Removed old API macros and prototypes.
* 2005-11-10 Martin Hunt <hunt@redhat.com>hunt2005-11-111-0/+2
| | | | | | | | | * pmap-gen.c (_stp_pmap_get()): New function. Aggregates the per-cpu map nodes into an aggregation map node. * map.c (_stp_new_agg): Return a struct map_node *. (_stp_add_agg): If count is 0 when adding, just set the stats.
* 2005-11-09 Martin Hunt <hunt@redhat.com>hunt2005-11-091-5/+0
| | | | | | * map.h: Remove HSTAT_LOG and HSTAT_LINEAR. * map-gen.c: Fix comment. * pmap-gen.c: Ditto.
* 2005-11-09 Martin Hunt <hunt@redhat.com>hunt2005-11-091-8/+1
| | | | | | | | | | | | | | | * map.h (struct map_root): Delete fields used by old API. * map.c: Remove old map API functions. * map-stat.c (_stp_map_add_stat): Delete. (_stp_pmap_new_hstat_linear): Move here from map.c. (_stp_pmap_new_hstat_log): Ditto. * list.c: Deleted. * map-keys.c: Deleted. * map-values.c: Deleted. * map-int.c: Deleted.
* 2005-11-08 Martin Hunt <hunt@redhat.com>hunt2005-11-081-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * map.c (_stp_map_init): New function. Extracted from _stp_map_new() so it can be used in _stp_pmap_new(). (_stp_map_new): Call _stp_map_init(). (_stp_pmap_new): New function. (_stp_pmap_new_hstat_linear): New function. (_stp_pmap_new_hstat_log): New function. (_stp_pmap_del): New function. (_stp_pmap_printn_cpu): New function. (_stp_pmap_printn): New function. (_stp_new_agg): New function. (_stp_add_agg): New function. (_stp_pmap_agg): New function. (_new_map_clear_node): New function. * map.h (struct map_root): Add Hist struct. Add copy and cmp function pointers for pmaps. * stat.h: Remove Stat struct. Replace with Hist struct that is limited to only histogram params. * map-stat.c: Fix up references to histogram params in map_root. * stat-common.c: Ditto. * stat.c: Ditto. * pmap-gen.c: New file. Implements per-cpu maps. * map-gen.c: Minor bug fixes. Use new VAL_IS_ZERO() macro. * alloc.c (vmalloc_node): For NUMA, provide a vmalloc that does node-local allocations. (_stp_alloc_cpu): A version of _stp_alloc() that does node-local allocations. (_stp_valloc): A version of _stp_valloc() that does node-local allocations. (__stp_valloc_percpu): New function. Like alloc_percpu() except uses _stp_valloc(). (_stp_vfree_percpu): New function. Like free_percpu().
* 2005-10-31 Martin Hunt <hunt@redhat.com>hunt2005-10-311-1/+11
| | | | * ALL: Cleanup copyrights.
* 2005-10-26 Martin Hunt <hunt@redhat.com>hunt2005-10-261-3/+12
| | | | | | | | | | | | | | | | | | * map.c (_new_map_create, _new_map_del_node, _new_map_del_node, _new_map_set_int64, _new_map_set_str,_new_map_get_int64, _new_map_get_str, _new_map_get_stat, _new_map_set_stat): New internal functions for the new API. * map-int.c (__stp_map_set_int64): Modify to return an error code. * map-stat.c (_stp_map_add_stat): Ditto. * map-str (_stp_map_set_str): Ditto. * Doxyfile: Remove predefines NEED_STRING_VALS, NEED_STATS, NEED_INT64. * map-keys.c: Ditto. * list.c (_stp_list_new): Ditto. Also set map->list. * map-values.c: Ditto.
* [ChangeLog]graydon2005-08-131-0/+2
| | | | | | | | | | | | | | | 2005-08-12 Graydon Hoare <graydon@redhat.com> * translate.cxx (c_tmpcounter::visit_array_in): Implement. (c_unparser::visit_array_in): Likewise. (mapvar::exists): New method. [runtime/ChangeLog] 2005-08-12 Graydon Hoare <graydon@redhat.com> * map-values.c (_stp_map_entry_exists): New function. * map.h (_stp_map_entry_exists): Declare it.
* 2005-06-18 Martin Hunt <hunt@redhat.com>hunt2005-06-181-22/+15
| | | | | | | | | | | | | | | | | | | | | | | * counter.c: New file. Counter aggregations. * stat.c: New file. Stat aggregations. * stat.h: Header file for stats. * map-int.c: New file. Support for int64 values. * map-stat.c: New file. Support for stat values. * map-str.c: New file. Support for string values. * map-values.c: Now just includes the necessary map-*.c files. * stat-common.c: New file. Stats stuff common to Stats and maps containing stats. * Doxyfile: Bumped version to 0.6. * README: Renamed README.doc and reorganized.
* 2005-05-31 Martin Hunt <hunt@redhat.com>hunt2005-05-311-4/+3
| | | | | | | | | * map.c (_stp_map_print): Now takes a format string instead of a name. * map.h (foreach): Update macro. * string.c (_stp_string_cat_char): New function. Append a char to a string.
* 2005-05-26 Martin Hunt <hunt@redhat.com>hunt2005-05-261-19/+28
| | | | | | | | * current.c (_stp_sprint_regs): Implement for i386. * sym.c (_stp_symbol_sprint): Check name before trying to print it. (_stp_symbol_print): Change to macro that calls _stp_symbol_sprint().
* Rewritten maps and other updated files.hunt2005-05-171-53/+104
|
* *** empty log message ***hunt2005-04-071-18/+18
|
* Update to use relayfs.hunt2005-04-071-8/+12
|
* *** empty log message ***hunt2005-03-291-15/+25
|
* *** empty log message ***hunt2005-03-221-24/+51
|
* *** empty log message ***hunt2005-03-221-6/+17
|
* Initial runtime checkin.hunt2005-03-091-0/+141