We are trying to reduce the memory footprint of our PacketTunnelProvider so we're using Instruments. The soonest point that we can attach Instruments is in startTunnel, since that's where we can put in a delay to give a developer sufficient time to attach Instruments to the PT process.
However, the memory footprint of our PT is already many MBs in size at that point. We've tried to use the Xcode memory graph but it's extremely difficult to use this approach since there are 1000s of objects created already and no way to associate them to a call tree.
Is there a way to attach Instruments near the initial launch of the PT process, ideally where its memory usage is as close to 0 as possible?