]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: remove incorrect FBT support code
authorKris Van Hees <kris.van.hees@oracle.com>
Wed, 23 Jan 2013 09:50:06 +0000 (04:50 -0500)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:41:40 +0000 (22:41 +0100)
Code that was supporting an early implementation of FBT was still left hanging
in the source code tree.  This patch removes it in preparation for a more
generic and above all, correct (and stable) implementation.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
include/linux/dtrace_os.h
kernel/dtrace/dtrace_os.c

index c0d0ed33fa3bb50c3453a88eee3cb89550a55fe7..4a828489770ba6fe697808b8ba415551d4931cd9 100644 (file)
@@ -72,13 +72,4 @@ typedef struct stacktrace_state {
 
 extern void dtrace_stacktrace(stacktrace_state_t *);
 
-#define FBT_PUSHL_EBP  0x55
-#define FBT_RET                0xc3
-#define FBT_RET_IMM16  0xc2
-
-typedef void           *(fbt_provide_fn)(struct module *, char *, uint8_t,
-                                         uint8_t *, void *);
-
-extern void dtrace_fbt_init(fbt_provide_fn);
-
 #endif /* _DTRACE_OS_H_ */
index 6bf95f1c27875b7af83f6bc3574c868a768677a6..f55bfd0a024e3806a9358becab70e343b61274b5 100644 (file)
@@ -910,62 +910,3 @@ long dtrace_rt_sigreturn(struct pt_regs *regs)
 
        return rc;
 }
-
-/*---------------------------------------------------------------------------*\
-(* FUNCTION BOUNDARY TRACING (FBT) SUPPORT                                   *)
-\*---------------------------------------------------------------------------*/
-
-void dtrace_fbt_init(fbt_provide_fn *pfn)
-{
-       loff_t                  pos = 0;
-       struct kallsym_iter     iter, sym;
-
-       kallsyms_iter_update(&iter, 0);
-       if (!kallsyms_iter_update(&iter, pos++))
-               return;
-
-       while (pos > 0) {
-               sym = iter;
-               if (!kallsyms_iter_update(&iter, pos++))
-                       pos = 0;
-
-               if (sym.module_name[0] != '\0')
-                       break;
-
-               if (sym.type == 'T' || sym.type == 't' || sym.type == 'W') {
-                       uint8_t *addr, *end;
-
-                       addr = (uint8_t *)sym.value;
-                       end = (uint8_t *)iter.value;
-
-                       if (*addr == FBT_PUSHL_EBP) {
-                               struct insn     insn;
-                               void            *pfbt = NULL;
-
-                               (*pfn)(dtrace_kmod, sym.name, FBT_PUSHL_EBP,
-                                      addr, NULL);
-
-                               while (addr < end) {
-                                       uint8_t opc;
-
-                                       insn_init(&insn, addr, 1);
-                                       insn_get_opcode(&insn);
-
-                                       opc = insn.opcode.bytes[0];
-
-                                       if (opc == FBT_RET ||
-                                           opc == FBT_RET_IMM16) {
-                                               pfbt = (*pfn)(dtrace_kmod,
-                                                             sym.name, opc,
-                                                             addr, pfbt);
-                                       }
-
-                                       insn_get_length(&insn);
-
-                                       addr += insn.length;
-                               }
-                       }
-               }
-       }
-}
-EXPORT_SYMBOL(dtrace_fbt_init);