diff options
author | hunt <hunt> | 2007-09-12 18:37:47 +0000 |
---|---|---|
committer | hunt <hunt> | 2007-09-12 18:37:47 +0000 |
commit | 3a18979dd18ba8cdd96367d2ad18c456f26c6f20 (patch) | |
tree | 9b345453171b5a796ecf65c59f052f9e9373c87a /runtime/map.h | |
parent | 674f70a0371c1f97a83c66268d03332ebbf9e62f (diff) | |
download | systemtap-steved-3a18979dd18ba8cdd96367d2ad18c456f26c6f20.tar.gz systemtap-steved-3a18979dd18ba8cdd96367d2ad18c456f26c6f20.tar.xz systemtap-steved-3a18979dd18ba8cdd96367d2ad18c456f26c6f20.zip |
2007-09-12 Martin Hunt <hunt@redhat.com>
* 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.
Diffstat (limited to 'runtime/map.h')
-rw-r--r-- | runtime/map.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/map.h b/runtime/map.h index f89dc521..6cd6e119 100644 --- a/runtime/map.h +++ b/runtime/map.h @@ -187,7 +187,7 @@ unsigned int str_hash(const char *key1); static MAP _stp_map_new(unsigned max_entries, int type, int key_size, int data_size); static PMAP _stp_pmap_new(unsigned max_entries, int type, int key_size, int data_size); static int msb64(int64_t x); -static MAP _stp_map_new_hstat_log(unsigned max_entries, int key_size, int buckets); +static MAP _stp_map_new_hstat_log(unsigned max_entries, int key_size); static MAP _stp_map_new_hstat_linear(unsigned max_entries, int ksize, int start, int stop, int interval); static void _stp_map_print_histogram(MAP map, stat *s); struct map_node * _stp_map_start(MAP map); @@ -202,7 +202,7 @@ static int _new_map_set_str (MAP map, struct map_node *n, char *val, int add); static void _new_map_clear_node (struct map_node *); static void _new_map_del_node (MAP map, struct map_node *n); static PMAP _stp_pmap_new_hstat_linear (unsigned max_entries, int ksize, int start, int stop, int interval); -static PMAP _stp_pmap_new_hstat_log (unsigned max_entries, int key_size, int buckets); +static PMAP _stp_pmap_new_hstat_log (unsigned max_entries, int key_size); static void _stp_add_agg(struct map_node *aptr, struct map_node *ptr); static struct map_node *_stp_new_agg(MAP agg, struct hlist_head *ahead, struct map_node *ptr); static void __stp_map_del(MAP map); |