From fa3f3d4d2e3d173750685ff89a0f53f8c8a2310c Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 9 Nov 2005 01:00:40 +0000 Subject: 2005-11-08 Martin Hunt * shellsnoop/shellsnoop.c: Updated to use new map API. * where_func/kprobe_where_funct.c: Ditto. * os_timer/os_timer.c (probe_start): Ditto. * test4/test4.c: Ditto. * scf/scf.c: Ditto. --- runtime/probes/where_func/kprobe_where_funct.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'runtime/probes/where_func') diff --git a/runtime/probes/where_func/kprobe_where_funct.c b/runtime/probes/where_func/kprobe_where_funct.c index 9bd4000a..680dabd8 100644 --- a/runtime/probes/where_func/kprobe_where_funct.c +++ b/runtime/probes/where_func/kprobe_where_funct.c @@ -4,15 +4,13 @@ Will Cohen */ -#define STP_NETLINK_ONLY #define STP_NUM_STRINGS 1 #include "runtime.h" -#define NEED_INT64_VALS - +#define VALUE_TYPE INT64 #define KEY1_TYPE INT64 -#include "map-keys.c" +#include "map-gen.c" #include "map.c" #include "probes.c" @@ -32,8 +30,7 @@ MAP funct_locations; static int inst_funct(struct kprobe *p, struct pt_regs *regs) { long ret_addr = _stp_ret_addr(regs); - _stp_map_key_int64(funct_locations, ret_addr); - _stp_map_add_int64(funct_locations, 1); + _stp_map_add_ii(funct_locations, ret_addr, 1); return 0; } @@ -48,7 +45,7 @@ static struct kprobe kp[] = { int probe_start(void) { - funct_locations = _stp_map_new_int64 (1000, INT64); + funct_locations = _stp_map_new_ii (1000); if (funct_name) kp[0].addr = funct_name; -- cgit