Sometime ago we shipped Caller/Callee to help you understand profiling data around a selected function by identifying who calls it, and who it calls. Based on your feedback, we’ve made it more discoverable and more powerful.
Meet Sandwich View. It places the function you care about between its callers and callees inside our flame graph, so you can answer two essential questions fast:
- What triggered this work?
- Where does this work feed into?
How to open Sandwich View
- From the flame graph or table: right‑click on any frame or row, then choose “Show in Sandwich.”
- You can pivot further at any time: right‑click inside Sandwich View to chase the next suspect.
A perfect use case for this with profiling data would be trying to understand memory allocations in your code. The Sandwich View can be used on the function of interest to trace allocation causes (callers) and effects (callees). It helps answer: ‘What triggered this allocation?’ and ‘What does that allocation feed into?’
In the flame graph above, we've drilled down to the `runtime.mallocgc` function and would like to answer the questions we asked above. To do that, we can right-click on the `runtime.mallocgc` frame and choose "Show in sandwich" to follow the trail. Feel free to try it in the iframe above.
You can try this feature on Polar Signals Cloud today with the 14-day free trial if you haven't already and let us know your feedback on our Discord community.
Happy profiling and a happy new year!