How to control layout-qualifier

Hi,


I'm writing a custom instrument that uses signpost intervals and plot-template to separate the intervals into different categories/lanes, in my case based on the thread the signpost came from, and then plot them. In my use case, more than one interval can be live per thread (nested inside the parent interval). I am trying to enforce that all intervals start at layout-qualifier 0 and increase based on the number of live intervals in that thread, so that each plot plots intervals starting at the top and stacking downward. If you don't do this, then the layout-qualifier is apparently based on the number of in-flight intervals process-wide at the time that inverval began, which results in each interval being drawn at a random Y offset within the plot, producing a lot of black space and doesn't reflect the hierarchical nature. Note that this behaviour is actually visible in the Trailblazer sample used in the WWDC Custom Instruments talk, i.e. you can see some plots are 2-wide with the intervals swapping between them.


I attempted to use the following to force the layout-qualifier to some variable:

<column>

<mnemonic>layout-qualifier</mnemonic>

<title>Layout ID</title>

<type>uint32</type>

<expression>?some-var</expression>

</column>


but I get an error that layout-qualifier is a reserved word. Makes sense. Is there any guidance for how to achieve this?


Thanks,

Chris

Replies

We have a way to override the layout qualifier coming (39611905), but in the mean time, if you're already computing a layout, you can just use that in your "plot-template" definition. Look at the "qualified-by" element under plot or plot-template in the Instruments Developer Help.