]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: fix retrieval of arg5 through arg9
authorKris Van Hees <kris.van.hees@oracle.com>
Tue, 27 Aug 2013 19:49:50 +0000 (15:49 -0400)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 21 Jul 2015 14:29:13 +0000 (15:29 +0100)
Fix the retrieval of arguments passed on the stack for SDT, USDT, and direct
call probes.  This commit also adds trivial support for testcases related to
this fix.

Orabug: 17368166

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

index 02d5cf90bbd4f87c29b4398489e05e2c215a12da..4fa09946edf67cff18e332c629d3ebcc676aec31 100644 (file)
@@ -16,6 +16,7 @@ typedef struct cpu_core {
        struct mutex cpuc_pid_lock;
 
        uintptr_t cpu_dtrace_caller;
+       struct pt_regs *cpu_dtrace_regs;
        ktime_t cpu_dtrace_chillmark;
        ktime_t cpu_dtrace_chilled;
        rwlock_t cpu_ft_lock;
index 572c580fca721c58d73def8aef9aabbf5e6f9274..994fca15201bef52476906e1eb8be09ed660b866 100644 (file)
@@ -34,6 +34,7 @@ void dtrace_cpu_init(void)
                cpuc->cpuc_dcpc_intr_state = 0;
                cpuc->cpuc_dtrace_illval = 0;
                mutex_init(&cpuc->cpuc_pid_lock);
+               cpuc->cpu_dtrace_regs = NULL;
                cpuc->cpu_dtrace_caller = 0;
                rwlock_init(&cpuc->cpu_ft_lock);
        }
index bee4c551a5dba91762da856331ec790d0abcb313..1501908f59d8a413debb84e92cdb946231bf61e2 100644 (file)
@@ -194,6 +194,12 @@ static void psinfo_cleaner(struct work_struct *work)
        psinfo_free_list = NULL;
        spin_unlock_irqrestore(&psinfo_lock, flags);
 
+#ifdef CONFIG_DT_DEBUG
+       DTRACE_PROBE8(test, uint64_t, 10, uint64_t, 20, uint64_t, 30,
+                           uint64_t, 40, uint64_t, 50, uint64_t, 60,
+                           uint64_t, 70, uint64_t, 80);
+#endif
+
        while (psinfo) {
                dtrace_psinfo_t *next = psinfo->next;