Parse Raw-Trace File

197 views
Skip to first unread message

Wanfeng Ma

unread,
Jul 12, 2023, 8:57:43 AM7/12/23
to Perfetto Development - www.perfetto.dev
一. Parse by SQL Query:
When I generated raw-trace file by use perfetto heapprofd script and put it to perfetto ui, I can get some inner infomation by use SQL Query,But there exist some problem as following:

1. Whether there just exits five table include all information of raw-trace?Whether I can use the five tables recover all raw-trace included infomation? 
Provide_5_Table.png

2. When receive a much number of data by execute sql query, the perfetto ui only display 9999 item infomation, whether exits some method or config can display all query item.
QuaryStackProfileCallSite.png
StackProfileCallSite_9999Item.png

二. Parse by API
1. Whether exits some api(python or C++ or other language) that can directly parse the native heap raw-trace file?

thank you!

Lalit Maganti

unread,
Jul 12, 2023, 9:01:43 AM7/12/23
to Wanfeng Ma, Perfetto Development - www.perfetto.dev
On Wed, 12 Jul 2023 at 13:57, Wanfeng Ma <wanf...@gmail.com> wrote:
一. Parse by SQL Query:
When I generated raw-trace file by use perfetto heapprofd script and put it to perfetto ui, I can get some inner infomation by use SQL Query,But there exist some problem as following:

1. Whether there just exits five table include all information of raw-trace?Whether I can use the five tables recover all raw-trace included infomation? 
Provide_5_Table.png

Those tables include the data for heap profiles. https://perfetto.dev/docs/analysis/sql-tables contains all the tables available in trace processor.
 
2. When receive a much number of data by execute sql query, the perfetto ui only display 9999 item infomation, whether exits some method or config can display all query item.
QuaryStackProfileCallSite.png
StackProfileCallSite_9999Item.png

二. Parse by API
1. Whether exits some api(python or C++ or other language) that can directly parse the native heap raw-trace file?

The suggestion for both these questions would be to use the Trace Processor Python API: https://perfetto.dev/docs/analysis/trace-processor#python-api
 

thank you!

--
You received this message because you are subscribed to the Google Groups "Perfetto Development - www.perfetto.dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to perfetto-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/perfetto-dev/32529905-7601-4949-9542-6cb7e94a3057n%40googlegroups.com.

Wanfeng Ma

unread,
Jul 31, 2023, 4:40:36 AM7/31/23
to Perfetto Development - www.perfetto.dev
Thank you for your reply, whether there exits some specific sql query command that can directly output unreleased malloc size、unrealeased malloc count、Total malloc size、Total malloc count to all function name?  thank you!
allocInfo.png

Lalit Maganti

unread,
Jul 31, 2023, 4:49:47 AM7/31/23
to Wanfeng Ma, Perfetto Development - www.perfetto.dev
There's no easy single answer I can give but looking at what the UI does for those buttons would be a good way to go: here and here

You should be able to hack together a query based on those snippets.

Reply all
Reply to author
Forward
0 new messages