summaryrefslogtreecommitdiffstats
path: root/runtime/probes/where_func
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2008-05-29 14:46:38 -0400
committerStan Cox <scox@redhat.com>2008-05-29 14:46:38 -0400
commitc39d889155d4c9365bd27691d22a92c447ced976 (patch)
tree64b56069b0435ac09564ba983bea154a9747bcbe /runtime/probes/where_func
parentef63732e82dd7979dcf608ba6ed4528e150b47ac (diff)
downloadsystemtap-steved-c39d889155d4c9365bd27691d22a92c447ced976.tar.gz
systemtap-steved-c39d889155d4c9365bd27691d22a92c447ced976.tar.xz
systemtap-steved-c39d889155d4c9365bd27691d22a92c447ced976.zip
SW5106 Remove old map and histogram formatting code
Diffstat (limited to 'runtime/probes/where_func')
-rw-r--r--runtime/probes/where_func/README29
-rwxr-xr-xruntime/probes/where_func/build2
-rw-r--r--runtime/probes/where_func/kprobe_where_funct.c62
-rw-r--r--runtime/probes/where_func/targets1
4 files changed, 0 insertions, 94 deletions
diff --git a/runtime/probes/where_func/README b/runtime/probes/where_func/README
deleted file mode 100644
index 78009566..00000000
--- a/runtime/probes/where_func/README
+++ /dev/null
@@ -1,29 +0,0 @@
-/** @dir where_func
-This is a silly little instrumentation routine to instrument functions
-entry by name. It makes use of the SystemTap runtime libraries to break
-down the number of times the function by caller.
-
-It demonstrates kprobes, passing a module parameter, using the print buffer,
-and using _stp_print_symbol() to map the addresses back to locations
-in functions.
-
-By default it instruments schedule().
-
-The instrumentation module is built by having the kernel that is going
-to be instrumented currently on the machine and doing
-\code
-./build
-\endcode
-The instrumentation is inserted as root with:
-\code
-/sbin/insmod kprobe_funct_where.ko funct_name=function_name
-\endcode
-The instrumentation is removed as root with:
-\code
-/sbin/rmmod kprobe_funct_where
-\endcode
--Will Cohen
-
-Note that this module is broken now because we don't pass the module parameter
-tp staprun. FIXME
-*/
diff --git a/runtime/probes/where_func/build b/runtime/probes/where_func/build
deleted file mode 100755
index f3e83244..00000000
--- a/runtime/probes/where_func/build
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-../build_probe $*
diff --git a/runtime/probes/where_func/kprobe_where_funct.c b/runtime/probes/where_func/kprobe_where_funct.c
deleted file mode 100644
index 680dabd8..00000000
--- a/runtime/probes/where_func/kprobe_where_funct.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* kprobe_where_funct.c
- this is a simple module to get information about calls to a function
- that is passed as a module option
- Will Cohen
-*/
-
-#define STP_NUM_STRINGS 1
-
-#include "runtime.h"
-
-#define VALUE_TYPE INT64
-#define KEY1_TYPE INT64
-#include "map-gen.c"
-
-#include "map.c"
-#include "probes.c"
-#include "sym.c"
-#include "current.c"
-
-MODULE_DESCRIPTION("SystemTap probe: where_func");
-MODULE_AUTHOR("Will Cohen and Martin Hunt");
-
-static char default_name[] = "schedule";
-static char *funct_name = default_name;
-module_param(funct_name, charp, 0);
-MODULE_PARM_DESC(funct_name, "function entry name.\n");
-
-MAP funct_locations;
-
-static int inst_funct(struct kprobe *p, struct pt_regs *regs)
-{
- long ret_addr = _stp_ret_addr(regs);
- _stp_map_add_ii(funct_locations, ret_addr, 1);
- return 0;
-}
-
-/*For each probe you need to allocate a kprobe structure*/
-static struct kprobe kp[] = {
- {
- .addr = default_name,
- .pre_handler = inst_funct,
- }
-};
-#define MAX_KPROBES (sizeof(kp)/sizeof(struct kprobe))
-
-int probe_start(void)
-{
- funct_locations = _stp_map_new_ii (1000);
-
- if (funct_name)
- kp[0].addr = funct_name;
-
- return _stp_register_kprobes (kp, MAX_KPROBES);
-}
-
-void probe_exit (void)
-{
- _stp_unregister_kprobes (kp, MAX_KPROBES);
-
- _stp_map_print (funct_locations, "Count: %d\tCaller: %1P");
- _stp_map_del(funct_locations);
-}
diff --git a/runtime/probes/where_func/targets b/runtime/probes/where_func/targets
deleted file mode 100644
index 7e8e4cf1..00000000
--- a/runtime/probes/where_func/targets
+++ /dev/null
@@ -1 +0,0 @@
-kprobe_where_funct