I would like to retrieve operation lengths of different metal GPU informations in form of xml. I know that exporting is possible using xtrace but how could i export the information of all wire memory statistics for example that are shown in the regarding row inside instruments. It would be helpful to get the xpath something in the GUI of Instruments belongs to. Specifically i am looking at Metal GPU traces. Any help is much appreciated! —toc gives a list of all contents but no description or affiliation with data in the GUI.
Instruments: Retrieving the xpath of a timeline
Hi maxi-mueller,
Xctrace allows to export raw data from underlying tables. Instruments Inspector convenient way to explore and better understand the tables.
How to use Inspector:
- Make a recording or open saved trace file in Instruments;
- Click
Document -> Inspector (⌘I)
; - A list of tables named by used scheme will be appeared on on the top left. It’s the same name as contains scheme attribute in
xctrace export --input input.trace --toc
output. And can be also used as part of --xpath; - Select a table in the list to expose its data below;
- Same data can be export by using
xctrace export --input input.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="my-table-schema"]'
where my-table-schema is a table name from step 3.
Let’s say we interesting in wire memory events. In Inspector we can find that the data belongs to metal-driver-event-intervals
table, rows with Event Type
equals Wire Memory
. To extract whole table including wire memory rows to xml we can use following command : xctrace export --input input.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="metal-driver-event-intervals"]'
.