From e94cb46c2219da504a559d49eeda3e4134b96453 Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 22 Mar 2005 18:36:50 +0000 Subject: *** empty log message *** --- runtime/docs/html/map_8c.html | 174 +++++++++++++++++++++++++++--------------- 1 file changed, 113 insertions(+), 61 deletions(-) (limited to 'runtime/docs/html/map_8c.html') diff --git a/runtime/docs/html/map_8c.html b/runtime/docs/html/map_8c.html index 22df45e4..6865ae63 100644 --- a/runtime/docs/html/map_8c.html +++ b/runtime/docs/html/map_8c.html @@ -12,9 +12,18 @@ Go to the source code of this file. - + + + + + + + @@ -45,6 +54,12 @@ + + + + @@ -69,7 +84,7 @@ - + @@ -84,6 +99,9 @@ + + +

Functions

MAP _stp_map_new (unsigned max_entries, enum valtype type)
+static unsigned string_hash (const char *key1, const char *key2)
+static unsigned mixed_hash (const char *key1, long key2)
MAP _stp_map_new (unsigned max_entries, enum valtype type)
 Create a new map.
+static void map_free_strings (MAP map, struct map_node *n)
void _stp_map_key_del (MAP map)
 Deletes the current element.
void _stp_map_key_long (MAP map, long key)
 Set the map's key to a long.
+static void map_copy_keys (MAP map, struct map_node *m)
+static void __stp_map_set_int64 (MAP map, int64_t val, int add)
void _stp_map_set_int64 (MAP map, int64_t val)
 Set the current element's value to an int64.
void _stp_map_stat_add (MAP map, int64_t val)
 Add to the current element's statistics.
MAP _stp_list_new (unsigned max_entries, enum valtype type)
MAP _stp_list_new (unsigned max_entries, enum valtype type)
 Create a new list.
void _stp_list_clear (MAP map)
int _stp_list_size (MAP map)
 Get the number of elements in a list.

Variables

static int map_sizes []

Detailed Description

Implements maps (associative arrays) and lists. @@ -135,9 +153,9 @@ Adds an int64 to a list.

-Definition at line 846 of file map.c. +Definition at line 845 of file map.c.

-References _stp_map_key_long(), _stp_map_set_int64(), and map_root::num. +References _stp_map_key_long(), _stp_map_set_int64(), and map_root::num.

@@ -184,9 +202,11 @@ Adds a string to a list.

-Definition at line 835 of file map.c. +Definition at line 834 of file map.c.

-References _stp_map_key_long(), _stp_map_set_str(), and map_root::num. +References _stp_map_key_long(), _stp_map_set_str(), and map_root::num. +

+Referenced by _stp_copy_argv_from_user().

@@ -223,9 +243,9 @@ All elements in the list are deleted.

Parameters:

-Definition at line 795 of file map.c. +Definition at line 794 of file map.c.

-References map_root::head, map_node::hnode, map_node::lnode, map_root::maxnum, map_root::num, and map_root::pool. +References _stp_free(), dlog(), map_root::head, map_node::hnode, map_node::lnode, map_root::maxnum, map_root::num, and map_root::pool.

@@ -242,7 +262,7 @@ References map_root::head, - enum valtype  + enum valtype  type @@ -274,9 +294,9 @@ A list is a map that internally has an incrementing long key for each member. Li

See also:
foreach

-Definition at line 783 of file map.c. +Definition at line 782 of file map.c.

-References _stp_map_new(), and map_root::no_wrap. +References _stp_map_new(), and map_root::no_wrap.

@@ -314,9 +334,9 @@ Get the number of elements in a list.

Returns:
The number of elements in a list.

-Definition at line 857 of file map.c. +Definition at line 856 of file map.c.

-References map_root::num. +References map_root::num.

@@ -365,7 +385,7 @@ If the element doesn't exist, it is created. If no current element (key) is set

See also:
_stp_map_set_int64

-Definition at line 548 of file map.c. +Definition at line 547 of file map.c.

@@ -402,9 +422,9 @@ Deletes a map, freeing all memory in all elements. Normally done only when the m

-Definition at line 195 of file map.c. +Definition at line 194 of file map.c.

-References map_root::head, map_node::lnode, and map_root::membuf. +References _stp_vfree(), map_root::head, map_node::lnode, and map_root::membuf.

@@ -442,9 +462,9 @@ Gets the current element's value.

Returns:
The value. If the current element is not set or doesn't exist, returns 0.

-Definition at line 558 of file map.c. +Definition at line 557 of file map.c.

-References map_root::create, and map_root::key. +References map_root::create, map_root::key, and map_node_int64::val.

@@ -482,9 +502,9 @@ Gets the current element's value.

Returns:
A pointer to the stats struct. If the current element is not set or doesn't exist, returns NULL.

-Definition at line 722 of file map.c. +Definition at line 721 of file map.c.

-References map_root::create, and map_root::key. +References map_root::create, map_root::key, and map_node_stat::stats.

@@ -522,9 +542,9 @@ Gets the current element's value.

Returns:
A string pointer. If the current element is not set or doesn't exist, returns NULL.

-Definition at line 639 of file map.c. +Definition at line 638 of file map.c.

-References map_root::create, and map_root::key. +References map_root::create, map_root::key, and map_node_str::str.

@@ -573,9 +593,9 @@ Get the next element in a map.

See also:
foreach

-Definition at line 176 of file map.c. +Definition at line 175 of file map.c.

-References map_root::head, and map_node::lnode. +References map_root::head, and map_node::lnode.

@@ -612,11 +632,11 @@ If no current element (key) for this map is set, this function does nothing.

-Definition at line 108 of file map.c. +Definition at line 107 of file map.c.

-References map_root::create, map_node::hnode, map_root::key, and map_node::lnode. +References _stp_free(), map_node::hnode, and map_node::lnode.

-Referenced by _stp_map_set_stat(), and _stp_map_set_str(). +Referenced by _stp_map_set_stat(), and _stp_map_set_str().

@@ -663,11 +683,11 @@ This sets the current element based on a long key. If the key is not found, a ne

-Definition at line 420 of file map.c. +Definition at line 419 of file map.c.

-References _stp_map_key_long_long(), and map_root::c_key2type. +References _stp_map_key_long_long(), and map_root::c_key2type.

-Referenced by _stp_list_add_int64(), and _stp_list_add_str(). +Referenced by _stp_list_add_int64(), and _stp_list_add_str().

@@ -721,11 +741,11 @@ This sets the current element based on a key of two strings. If the keys are not

-Definition at line 223 of file map.c. +Definition at line 222 of file map.c.

-References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, and key_data::val. +References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, and key_data::val.

-Referenced by _stp_map_key_long(). +Referenced by _stp_map_key_long().

@@ -779,9 +799,9 @@ This sets the current element based on a key of a long and a string. If the keys

-Definition at line 363 of file map.c. +Definition at line 362 of file map.c.

-References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, map_node::key2, key_data::str, and key_data::val. +References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, map_node::key2, key_data::str, and key_data::val.

@@ -828,9 +848,9 @@ This sets the current element based on a string key. If the key is not found, a

-Definition at line 404 of file map.c. +Definition at line 403 of file map.c.

-References _stp_map_key_str_str(), and map_root::c_key2type. +References _stp_map_key_str_str(), and map_root::c_key2type.

@@ -884,9 +904,9 @@ This sets the current element based on a key of a string and a long. If the keys

-Definition at line 315 of file map.c. +Definition at line 314 of file map.c.

-References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, map_node::key2, key_data::str, and key_data::val. +References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, map_node::key2, key_data::str, and key_data::val.

@@ -940,11 +960,11 @@ This sets the current element based on a key of two strings. If the keys are not

-Definition at line 266 of file map.c. +Definition at line 265 of file map.c.

-References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, map_node::key2, and key_data::str. +References map_root::c_key1, map_root::c_key1type, map_root::c_key2, map_root::c_key2type, map_root::c_keyhead, map_root::create, map_root::hashes, map_root::key, map_node::key1, map_node::key2, and key_data::str.

-Referenced by _stp_map_key_str(). +Referenced by _stp_map_key_str().

@@ -961,7 +981,7 @@ Referenced by _stp_map_key_str()< - enum valtype  + enum valtype  type @@ -992,11 +1012,11 @@ Maps must be created at module initialization time.

Parameter
Returns:
A MAP on success or NULL on failure.

-Definition at line 47 of file map.c. +Definition at line 46 of file map.c.

-References map_root::head, map_root::maxnum, map_root::membuf, map_root::pool, and map_root::type. +References _stp_valloc(), map_root::head, map_root::maxnum, map_root::membuf, map_root::pool, and map_root::type.

-Referenced by _stp_list_new(). +Referenced by _stp_list_new().

@@ -1045,9 +1065,9 @@ If the element doesn't exist, it is created. If no current element (key) is set

See also:
_stp_map_add_int64

-Definition at line 531 of file map.c. +Definition at line 530 of file map.c.

-Referenced by _stp_list_add_int64(). +Referenced by _stp_list_add_int64().

@@ -1093,14 +1113,14 @@ If the element doesn't exist, it is created. If no current element (key) is set stats pointer to stats struct.

-
Todo:
Histograms don't work yet.
+
Todo:
Histograms don't work yet.

-Definition at line 663 of file map.c. +Definition at line 662 of file map.c.

-References _stp_map_key_del(), map_root::create, map_root::head, map_root::key, map_root::maxnum, map_root::no_wrap, and map_root::pool. +References _stp_calloc(), _stp_map_key_del(), map_root::create, map_root::head, map_node::hnode, map_root::key, map_node::lnode, map_root::maxnum, map_node_stat::n, map_root::no_wrap, map_root::pool, and map_node_stat::stats.

-Referenced by _stp_map_stat_add(). +Referenced by _stp_map_stat_add().

@@ -1148,11 +1168,11 @@ If the element doesn't exist, it is created. If no current element (key) is set

-Definition at line 578 of file map.c. +Definition at line 577 of file map.c.

-References _stp_map_key_del(), map_root::create, map_root::head, map_root::key, map_root::maxnum, map_root::no_wrap, and map_root::pool. +References _stp_alloc(), _stp_calloc(), _stp_free(), _stp_map_key_del(), map_root::create, map_root::head, map_node::hnode, map_root::key, map_node::lnode, map_root::maxnum, map_node_str::n, map_root::no_wrap, map_root::pool, and map_node_str::str.

-Referenced by _stp_list_add_str(). +Referenced by _stp_list_add_str().

@@ -1191,9 +1211,9 @@ Get the first element in a map.

See also:
foreach

-Definition at line 153 of file map.c. +Definition at line 152 of file map.c.

-References map_root::head. +References map_root::head.

@@ -1239,14 +1259,46 @@ If the element doesn't exist, it is created. If no current element (key) is set val value to add to the statistics -

Todo:
Histograms don't work yet.
+
Todo:
Histograms don't work yet.
+ +

+Definition at line 742 of file map.c. +

+References _stp_map_set_stat(), stat::count, map_root::create, map_root::key, stat::max, stat::min, map_node_stat::stats, and stat::sum. + + +


Variable Documentation

+

+ + + + +
+ + + + +
int map_sizes[] [static]
+
+ + + + +Definition at line 6 of file map.c.
+   +

-Definition at line 743 of file map.c. +Initial value:

 {
+        sizeof(struct map_node_int64),
+        sizeof(struct map_node_stat),
+        sizeof(struct map_node_str),
+        0
+}
+

-References _stp_map_set_stat(), map_root::create, and map_root::key.


-Generated on Tue Mar 22 00:32:02 2005 for SystemTap. +Generated on Tue Mar 22 10:27:36 2005 for SystemTap. -- cgit