| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* runtime/map-gen.c, pmap-gen.c: Hand-expand arity 6..9 cases throughout.
* testsuite/buildok/thirty.stp: New test.
* testsuite/buildko/two.stp: New test.
An Alan Smithee patch.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sym.h (_stp_module): Add text_size, lock, and unwind data
pointer.
* sym.c (_stp_find_module_by_addr): New function.
(_stp_kallsyms_lookup): Call _stp_find_module_by_addr().
(_stp_get_unwind_info): New.
* runtime.h: Move debug macros to debug.h. Include it.
* debug.h: New file.
* map.c: Update debug calls.
* map-gen.c: Update debug calls.
* pmap-gen.c: Update debug calls.
* mempool.c: New file.
* symbols.c: Use rwlocks. Use new dbug macros. Handle
unwind info if present.
* transport.c: Include mempool.c. Update dbug and kbug calls
to new macros.
* transport_msgs.h (_stp_command_name): Add
struct containing message names for debugging.
* control.c, procfs.c: Use new dbug macros. Use
new mempool functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
* map-gen.c (_stp_map_exists): New. Check for membership only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 3708
* map.c (str_copy): Check for NULL pointers.
(_new_map_set_int64): Don't check val for 0.
(_new_map_set_str): Don't check val for NULL.
* map-gen.c (VAL_IS_ZERO): Removed.
(_stp_map_del): New.
(__stp_map_set): Don't check for zero.
* pmap-gen.c (VAL_IS_ZERO): Removed.
(_stp_pmap_del): New.
(__stp_pmap_set): Don't check for zero.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* map.h: Remove HSTAT_LOG and HSTAT_LINEAR.
* map-gen.c: Fix comment.
* pmap-gen.c: Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* map-gen.c (MAP_GET_VAL): Use the _stp_get_*() functions.
(_stp_map_set_*): When setting to "", don't create
node if key not found.
(_stp_map_get_*): Use new MAP_GET_VAL. Return "" when
string lookups not found.
* map.c (_stp_get_int64): Check args and return
0 on bad args or wrong type.
(_stp_get_stat): Ditto.
(_stp_key_get_int64): Ditto.
(_stp_get_str): Check args and return
"bad type" on bad args or wrong type.
(_stp_key_get_str): Ditto.
(_new_map_set_str): If setting to "", delete node.
(_new_map_get_*): Delete. Use _stp_get_*().
|
|
|
|
|
| |
* map-gen.c (KEY4CPY): Fix typo.
(KEYCPY): Add missing semicolon.
|
|
* 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.
|