Is it expected that Instruments can't deal with very large trace bundles?

I ran it (Leaks) on a process for about 2 hours. It collected 68gytes of data. It cannot open the folder -- can't find a file (which is there as a .zip archive) or if I expand it, just an error about missing an index.

Filing a bug about this is difficult, since it's 68gbyets of data.

Hi kithrup,

Yes, it is expected that Instruments should be able to deal with an arbitrary size of a trace bundle, including very large one. It make sense that it could be tricky to upload 68Gb of trace. But even without the trace a filed bug with steps to reproduce the issue, expectation and screenshot or video of the issue, could be valuable.

If you are interested in Leaks only you can try different approach as a workaround:

  1. Enable MallocStackLogging by switching it on in Scheme -> Diagnostics -> Malloc Stack Logging or as with environment variable as described in the instruction (https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html).
  2. Use Product->Profile in Xcode to open Instruments targeting your app, choose Blank template and add Leaks instrument only. Instruments will inherit the environment variables from Xcode and thus also run with Malloc Stack Logging.
  3. Run the target process for 2 hours or more. You can also adjust leaks snapshot interval during recording using Snapshots button at the bottom.

The trace file at the end should be much smaller (assuming Allocations instrument contributed a lot to the trace file) and Instruments should work with them without an issue.

If you are interested in Allocations as well, you could try to enable Malloc Stack Logging, let the target app run for 2 hours without Instruments recording, and at the end capture a memgraph as described in the instruction (https://developer.apple.com/documentation/xcode/gathering-information-about-memory-use) and import the memgraph to Instrument or use it in Xcode Memory Debugger.

I filed FB13792209 about this. I don't think it uploaded my 10+gbyte attachment. Please feel free to contact me OOB to figure out how to get the file to apple.

leaks can't be used to arbitrarily turn it on and off. Running the process under either Instruments or with MallocStackLogging results in it using significantly more memory, which makes this all terribly fun.

Is it expected that Instruments can't deal with very large trace bundles?
 
 
Q