Instruments: indicate what type(s) call paths are specialized to in Swift traces

Originator:rix.rob
Number:rdar://23519997 Date Originated:12-Nov-2015 02:11 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Instruments 7.1.1 (59040)
Classification:Enhancement Reproducible:Always
 
Summary:
Using the time profiler, hiding system libraries and/or charging some symbols to their callers can be helpful for focusing on bottlenecks. However, it can also be misleading with e.g. generic code where a call might have different performance implications in some cases.

For example, I am using Swift stdlib’s `SequenceType.contains` extension method to discover whether an index lies within a range. When my code is specialized to use a CollectionType whose indices conform to RandomAccessIndexType, this is O(1); whereas with ForwardIndexType, it’s O(n). Thus, while Instruments can tell me that this call is taking 25% of my runtime, it’s unclear what the collection and index types actually are in the hot path here. Showing the types which the generics are specialized to could inform optimization much more directly than going back and forth between Instruments and the source/debugger.


Steps to Reproduce:
N/A

Expected Results:
N/A

Actual Results:
N/A

Regression:
N/A

Notes:
N/A

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!