I am trying to export .trace file data to xml using the following command
xctrace export --input report.trace --xpath '/trace-toc/run[@number="1"]/tracks/track[@name="Leaks"]/details/detail[@name="Leaks"]' --output output.xml
<?xml version="1.0"?>
<trace-query-result>
<node xpath='//trace-toc[1]/run[1]/tracks[1]/track[2]/details[1]/detail[1]'><row leaked-object="Swift.StringStorage" size="131072" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x130018000"/>
<row leaked-object="Swift.StringStorage" size="131072" responsible-frame="<Allocated Prior To Attach>" count="1" responsible-library="" address="0x140118000"/>
<row leaked-object="MemoryLeaker" size="48" responsible-frame="<Allocated Prior To Attach>" count="1" responsible-library="" address="0x60000152d6e0"/>
<row leaked-object="MemoryLeaker" size="48" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x6000015f56e0"/>
<row leaked-object="Swift.StringStorage" size="131072" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x120028000"/>
<row leaked-object="Swift.StringStorage" size="131072" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x120048000"/>
<row leaked-object="Swift.StringStorage" size="131072" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x130038000"/>
<row leaked-object="Swift.StringStorage" size="131072" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x130058000"/>
<row leaked-object="MemoryLeaker" size="48" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x6000015038d0"/>
<row leaked-object="MemoryLeaker" size="48" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x600001508ea0"/>
<row leaked-object="MemoryLeaker" size="48" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x60000150a4c0"/>
<row leaked-object="MemoryLeaker" size="48" responsible-frame="_swift_allocObject_" count="1" responsible-library="libswiftCore.dylib" address="0x60000150cfc0"/>
</node></trace-query-result>
Data is being converted to xml but without any details of the Stack Trace
Is there any documentation that shows how I can include the Stack Trace as well?
Does xctrace support any other export format besides XML?
Thanks
Post
Replies
Boosts
Views
Activity
I am facing an issue trying to detect a memory leak for iOS project with any Simulator for iOS 16.1 on Xcode 14.1
I am working on an example app https://github.com/Showmax/automated-memory-leak-testing-ios
That simply creates a memory leak using a strong delegation between Two classes
The expectation: when using the memory debug graph I am expecting that Xcode will mark the instance of GeneratorViewController that have a leak as a leak.
Behavior: It doesn't
The same behavior is happing when I am using the instrument tool with the defaults Leaks template.
I only see can see tons of leaks when I use Simulator iOS 14 which I am not sure why it's different.
Can you please support?
Thanks