]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "stack() / jstack(): Send PID to userspace."
authorKris Van Hees <kris.van.hees@oracle.com>
Wed, 10 Apr 2013 08:40:53 +0000 (04:40 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Wed, 10 Apr 2013 08:40:53 +0000 (04:40 -0400)
This reverts commit d42235829341592e23996d727bc5c3beebec1e57.  The bug with
the PID not being passed is a bug in dtrace_isa.c instead, and there is a slot
already reserved for that.  So this patch was not necessary, and the bug will
be fixed in dtrace_isa.c get_ufpstack and get_upcstack with a subsequent
commit.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
dtrace/dtrace_ecb.c
dtrace/dtrace_probe.c

index c2c929324a648f99eae02b5f8ca2970861bb2b69..596477c7e0af4fa42dc3c2c9c4a2262b9739be5e 100644 (file)
@@ -278,8 +278,7 @@ static int dtrace_ecb_action_add(dtrace_ecb_t *ecb, dtrace_actdesc_t *desc)
                                arg = DTRACE_USTACK_ARG(nframes, strsize);
                        }
 
-                       size = (nframes + 2) * sizeof(uint64_t); /* +1 for limit,
-                                                                   +1 for PID */
+                       size = (nframes + 1) * sizeof(uint64_t);
                        size += DTRACE_USTACK_STRSIZE(arg);
                        size = P2ROUNDUP(size, (uint32_t)(sizeof(uintptr_t)));
 
index a161c9301d9337d757d670106ececf056ca09e8a..0a6cb394a61bebbc97a815e4bfde7faade75438b 100644 (file)
@@ -855,9 +855,7 @@ void dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
                                continue;
 
                        case DTRACEACT_JSTACK:
-                       case DTRACEACT_USTACK: {
-                               pid_t   pid = current->pid;
-
+                       case DTRACEACT_USTACK:
                                if (!dtrace_priv_proc(state))
                                        continue;
 
@@ -877,35 +875,29 @@ void dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
                                        continue;
                                }
 
-                               DTRACE_STORE(uint64_t, tomax, valoffs,
-                                            (uint64_t)pid);
-
                                if (DTRACE_USTACK_STRSIZE(rec->dtrd_arg) != 0 &&
                                    current->dtrace_helpers != NULL) {
                                        /*
                                         * This is the slow path -- we have
                                         * allocated string space, and we're
                                         * getting the stack of a process that
-                                        * has helpers.  Call into a separate
+                                        * has helpers.  Call into a separate
                                         * routine to perform this processing.
                                         */
                                        dtrace_action_ustack(
                                                &mstate, state,
-                                               (uint64_t *)(tomax + valoffs +
-                                                            sizeof(uint64_t)),
+                                               (uint64_t *)(tomax + valoffs),
                                                rec->dtrd_arg);
                                        continue;
                                }
 
                                DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
                                dtrace_getupcstack(
-                                       (uint64_t *)(tomax + valoffs +
-                                                    sizeof(uint64_t)),
+                                       (uint64_t *)(tomax + valoffs),
                                        DTRACE_USTACK_NFRAMES(rec->dtrd_arg) +
                                        1);
                                DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
                                continue;
-                       }
 
                        default:
                                break;