X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e..c6bf4f310a33a9262d455ea4d3f0630b1255e3fe:/osfmk/kperf/callstack.c?ds=sidebyside diff --git a/osfmk/kperf/callstack.c b/osfmk/kperf/callstack.c index d6f0fb9a9..4a38dd7c5 100644 --- a/osfmk/kperf/callstack.c +++ b/osfmk/kperf/callstack.c @@ -254,7 +254,7 @@ kperf_backtrace_sample(struct kp_kcallstack *cs, struct kperf_context *context) cs->kpkc_nframes += 1; } if (trunc) { - cs->kpkc_nframes |= CALLSTACK_TRUNCATED; + cs->kpkc_flags |= CALLSTACK_TRUNCATED; } BUF_VERB(PERF_CS_BACKTRACE | DBG_FUNC_END, cs->kpkc_nframes); @@ -437,12 +437,15 @@ kperf_ucallstack_log(struct kp_ucallstack *cs) } int -kperf_ucallstack_pend(struct kperf_context * context, uint32_t depth) +kperf_ucallstack_pend(struct kperf_context * context, uint32_t depth, + unsigned int actionid) { - int did_pend = kperf_ast_pend(context->cur_thread, T_KPERF_AST_CALLSTACK); + if (depth < 2) { + panic("HUH"); + } kperf_ast_set_callstack_depth(context->cur_thread, depth); - - return did_pend; + return kperf_ast_pend(context->cur_thread, T_KPERF_AST_CALLSTACK, + actionid); } static kern_return_t