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)));
continue;
case DTRACEACT_JSTACK:
- case DTRACEACT_USTACK: {
- pid_t pid = current->pid;
-
+ case DTRACEACT_USTACK:
if (!dtrace_priv_proc(state))
continue;
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;