ftrace_event table in python API

47 views
Skip to first unread message

Jaeheon Lee

unread,
Aug 6, 2024, 4:23:42 AM8/6/24
to Perfetto Development - www.perfetto.dev
Hi, 
I cannot retrieve any events from the ftrace_event table using the perfetto python API.
When I use the query 

select COUNT(*) from ftrace_event

in the sql embedded in the Perfetto UI, I get 1209622
However, Using the perfetto UI, I get

  COUNT(*)
0        0


as the result. The trace I am using is the example_android_trace_15s provided in the UI.
The code I used for the python API is 

from perfetto.trace_processor import TraceProcessor
tp = TraceProcessor(trace="example_android_trace_15s")
print(tp.query('select COUNT(*) from ftrace_event').as_pandas_dataframe())


I have tried updating the trace processor using TraceProcessorConfig, but got the same results. This was the same for all other traces as well. 

Thanks

Lalit Maganti

unread,
Aug 6, 2024, 4:25:21 AM8/6/24
to Jaeheon Lee, Perfetto Development - www.perfetto.dev
The Python API disables ftrace ingestion into the ftrace_event and raw tables by default to save memory.

You can reenable ingestion by setting the `ingest_ftrace_in_raw` option of TraceProcessorConfig to true. (see https://cs.android.com/android/platform/superproject/+/android14-qpr3-release:external/perfetto/python/perfetto/trace_processor/api.py;l=48?q=ftrace%20f:py%20f:perfetto).

--
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/908570db-0725-41f4-aba8-27eb83d2fadfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages