diff options
Diffstat (limited to 'runtime/probes/scf')
-rw-r--r-- | runtime/probes/scf/README | 12 | ||||
-rwxr-xr-x | runtime/probes/scf/build | 2 | ||||
-rw-r--r-- | runtime/probes/scf/scf.c | 50 | ||||
-rw-r--r-- | runtime/probes/scf/targets | 1 |
4 files changed, 0 insertions, 65 deletions
diff --git a/runtime/probes/scf/README b/runtime/probes/scf/README deleted file mode 100644 index 39fcfda8..00000000 --- a/runtime/probes/scf/README +++ /dev/null @@ -1,12 +0,0 @@ -/** @dir scf -This example probe instruments smp_call_function(). - -It demonstrates using stack backtraces as map keys to compute the most -common path to a function. - -kernel.function("smp_call_function") -{ - traces[stack()] += 1 -} - -*/ diff --git a/runtime/probes/scf/build b/runtime/probes/scf/build deleted file mode 100755 index f3e83244..00000000 --- a/runtime/probes/scf/build +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -../build_probe $* diff --git a/runtime/probes/scf/scf.c b/runtime/probes/scf/scf.c deleted file mode 100644 index 0e29df43..00000000 --- a/runtime/probes/scf/scf.c +++ /dev/null @@ -1,50 +0,0 @@ -#define STP_NUM_STRINGS 1 -#include "runtime.h" - -#define MAP_STRING_LENGTH 512 - -#define VALUE_TYPE INT64 -#define KEY1_TYPE STRING -#include "map-gen.c" - -#include "map.c" -#include "sym.c" -#include "current.c" -#include "stack.c" -#include "probes.c" - -MODULE_DESCRIPTION("SystemTap probe: scf"); -MODULE_AUTHOR("Martin Hunt <hunt@redhat.com>"); - -MAP map1; - -int inst_smp_call_function (struct kprobe *p, struct pt_regs *regs) -{ - String str = _stp_string_init (0); - _stp_stack_sprint (str, regs, 1); - _stp_map_add_si (map1, _stp_string_ptr(str), 1); - return 0; -} - -static struct kprobe stp_probes[] = { - { - .addr = (kprobe_opcode_t *)"smp_call_function", - .pre_handler = inst_smp_call_function - }, -}; - -#define MAX_STP_ROUTINE (sizeof(stp_probes)/sizeof(struct kprobe)) - -int probe_start(void) -{ - map1 = _stp_map_new_si (100); - return _stp_register_kprobes (stp_probes, MAX_STP_ROUTINE); -} - -void probe_exit (void) -{ - _stp_unregister_kprobes (stp_probes, MAX_STP_ROUTINE); - _stp_map_print (map1, "trace[%1s] = %d\n"); - _stp_map_del (map1); -} - diff --git a/runtime/probes/scf/targets b/runtime/probes/scf/targets deleted file mode 100644 index aafcca22..00000000 --- a/runtime/probes/scf/targets +++ /dev/null @@ -1 +0,0 @@ -scf |