There's a special Dynamic Stack Tracing category.
If you create your OS Log handle with this category: https://developer.apple.com/documentation/os/oslog/category/3242665-dynamicstacktracing
os-signpost table will then contain implicit backtrace column. To bind to the backtraces in your os-signpost-interval-schema — bind the new variable in the (start|end)-pattern/user-backtrace field.
Please let me know if you have any troubles with getting this working.
Exciting! Will look into it when I find time in the next couple of days - thanks for the tip
So, migrated successfully to using the "DynamicStackTracing" category and I can still see my intervals plotted.
However I haven't been successful at capturing the backtrace:
<os-signpost-interval-schema> ... <start-pattern> <message>"subscribe:" ?subscription-name</message> <user-backtrace>?backtrace</user-backtrace> </start-pattern>
Fails to compile with:
[TMPLTDEF1] Invalid slot 'user-backtrace' not defined in corresponding deftemplate 'os-signpost'.
Thanks. That's a bug and I started tracking it. This is a problem in the auto-generation of modelers code.
For now, you can always create your own modeler (instead of letting os-signpost-interval-schema generate one) and use os-signpost events directly to capture backtraces from them.
You can see how direct capture of data from os-signpost table can be done by watching Modeling in Custom Instruments WWDC session and following associated sample code. In case of any questions you might have — please free to ask them here.
Really sorry for your inconvenience.
Thanks so much for your help, I'll wait to see if that gets fixed