How to join ustack() and stack()?

From: Mateusz Piotrowski <0mp_at_FreeBSD.org>
Date: Mon, 05 Sep 2022 08:59:21 UTC
Hi dtrace@,

I'd like to produce a flame graph that shows both stack() and ustack() at the same time. Is there an easy way to do it in DTrace? 

strjoin(ustack(), stack()) does not work, because those functions output is typed as "stack" instead of "string". There also seem to be no function called stacktostr() that could be handy here.

Best,
Mateusz