]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/dev/dtrace/fbt.c
xnu-2422.115.4.tar.gz
[apple/xnu.git] / bsd / dev / dtrace / fbt.c
index 5a6570ed1cd7b5dc886d01d2352b49e49dcc4d06..3101debd1482c38d88723cc9170c1e3b3fdad7b2 100644 (file)
 
 /* #include <machine/trap.h> */
 struct savearea_t; /* Used anonymously */
-typedef kern_return_t (*perfCallback)(int, struct savearea_t *, uintptr_t *, int);
 
+typedef kern_return_t (*perfCallback)(int, struct savearea_t *, uintptr_t *, __unused int);
 extern perfCallback tempDTraceTrapHook;
-extern kern_return_t fbt_perfCallback(int, struct savearea_t *, uintptr_t *);
+extern kern_return_t fbt_perfCallback(int, struct savearea_t *, uintptr_t *, __unused int);
 
 #define        FBT_ADDR2NDX(addr)      ((((uintptr_t)(addr)) >> 4) & fbt_probetab_mask)
 #define        FBT_PROBETAB_SIZE       0x8000          /* 32k entries -- 128K total */
@@ -207,6 +207,8 @@ fbt_suspend(void *arg, dtrace_id_t id, void *parg)
 
            (void)ml_nofault_copy( (vm_offset_t)&fbt->fbtp_savedval, (vm_offset_t)fbt->fbtp_patchpoint, 
                                                                sizeof(fbt->fbtp_savedval));
+               
+               
            fbt->fbtp_currentval = fbt->fbtp_savedval;
        }
        
@@ -240,6 +242,8 @@ fbt_resume(void *arg, dtrace_id_t id, void *parg)
        
            (void)ml_nofault_copy( (vm_offset_t)&fbt->fbtp_patchval, (vm_offset_t)fbt->fbtp_patchpoint, 
                                                                sizeof(fbt->fbtp_patchval));
+
+               
            fbt->fbtp_currentval = fbt->fbtp_patchval;
        }