Add ps_thread_stack() function, to print a full Performance Schema thread stack, in JSON format, with SELECT sys.ps_thread_stack(<thd_id>, <debug>);