google / perfetto

Performance instrumentation and tracing for Android, Linux and Chrome (read-only mirror of https://android.googlesource.com/platform/external/perfetto/)

Home Page:https://www.perfetto.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot open this file

araud opened this issue · comments

commented

https://ui.perfetto.dev/ is incapable of opening the old trace supported by catapult:

image

[CSGO_RVP_s.etl.zip](https://github.com/google/perfetto/files/8017506/CSGO_RVP_s.etl.zip)

Please see the file attached.

Out of curiosity where did this file come from? It's the first time I see a zip file with ftrace data (ETL sounds like WIndows's ETW but then contains ftrace so it's clearly not windows)

EDIT: actually this is weird, it's ftrace format but there are clearly windows processes in that trace.

In general ui.perfetto.dev does NOT supports all formats supported by catapult. We added support for the most commonly used ones, for the rest, happy to consider designs and patches but it's unlikely we'll go there ourselves if there isn't a huge use case.

This is the first time I have ever seen this trace format

Unziping the zip and opening the .ftrace file inside loads correctly for me:
image
We're not going to support the zip format directly (and even the JSON format seems to be not strictly to spec) so I don't think there's anything actionable here.

We had a discussion offline.
FTR you can obtain the same (i.e. having a trace that has both ftrace and userspace trace events) by populating a JSON that looks like this:

{
  "systemTraceEvents":"# tracer: nop\n#\n# entries-in-buffer/entries-written: 10206/10206   #P:8\n#\n#                                      _-----=> irqs-off\n#                                     / _----=> need-resched\n#                                    | / _---=> hardirq/softirq\n#                                    || / _--=> preempt-depth\n#                                    ||| /     delay\n#           TASK-PID    TGID   CPU#  ||||    TIMESTAMP  FUNCTION\n#              | |        |      |   ||||       |         |\n          atrace-20450 (20450) [004] ...1 6824711.826302: tracing_mark_write: trace_event_clock_sync: parent_ts=6501986.000000\n          atrace-20450 (20450) [004] ...1 6824711.826306: tracing_mark_write: trace_event_clock_sync: realtime_ts=1571836588089\n          <idle>-0     (-----) [002] d.h4 6824711.826455: sched_waking: comm=kworker/u17:1 pid=1134 prio=100 target_cpu=006\n          <idle>-0     (-----) [006] dnh3 6824711.826490: sched_wakeup: comm=kworker/u17:1 pid=1134 prio=100 target_cpu=006\n          <idle>-0     (-----) [006] d..3 6824711.826499: sched_switch: prev_comm=swapper/6 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/u17:1 next_pid=1134 next_prio=100\n   kworker/u17:1-1134  ( 1134) [006] d..3 6824711.826510: sched_waking: comm=kworker/6:1 pid=14833 prio=120 target_cpu=006\n   kworker/u17:1-1134  ( 1134) [006] d..4 6824711.826512: sched_wakeup: comm=kworker/6:1 pid=14833 prio=120 target_cpu=006\n   kworker/u17:1-1134  ( 1134) [006] d..3 6824711.826519: sched_switch: prev_comm=kworker/u17:1 prev_pid=1134 prev_prio=100 prev_state=S ==> next_comm=kworker/6:1 next_pid=14833 next_prio=120\n     kworker/6:1-14833 (14833) [006] d..3 6824711.826533: sched_waking: comm=UsbFfs-worker pid=20308 prio=120 target_cpu=002\n          <idle>-0     (-----) [002] dnh3 6824711.826561: sched_wakeup: comm=UsbFfs-worker pid=20308 prio=120 target_cpu=002\n     kworker/6:1-14833 (14833) [006] d.s3 6824711.826562: sched_waking: comm=rcu_sched pid=8 prio=120 target_cpu=006\n     kworker/6:1-14833 (14833) [006] d.s4 6824711.826569: sched_wakeup: comm=rcu_sched pid=8 prio=120 target_cpu=006\n     kworker/6:1-14833 (14833) [006] d.s3 6824711.826570: sched_waking: comm=rcu_preempt pid=7 prio=120 target_cpu=006\n          <idle>-0     (-----) [002] d..3 6824711.826574: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=UsbFfs-worker next_pid=20308 next_prio=120\n     kworker/6:1-14833 (14833) [006] d.s4 6824711.826576: sched_wakeup: comm=rcu_preempt pid=7 prio=120 target_cpu=006\n     kworker/6:1-14833 (14833) [006] d..3 6824711.826588: sched_switch: prev_comm=kworker/6:1 prev_pid=14833 prev_prio=120 prev_state=S ==> next_comm=rcu_preempt next_pid=7 next_prio=120\n     rcu_preempt-7     (    7) [006] d..4 6824711.826594: sched_waking: comm=rcuop/6 pid=60 prio=120 target_cpu=002\n     rcu_preempt-7     (    7) [006] d..4 6824711.826602: sched_waking: comm=rcuop/0 pid=10 prio=120 target_cpu=000\n   UsbFfs-worker-20308 (20305) [002] d.h2 6824711.826608: sched_wakeup: comm=rcuop/6 pid=60 prio=120 target_cpu=002\n     rcu_preempt-7     (    7) [006] d..4 6824711.826610: sched_waking: comm=rcuop/4 pid=44 prio=120 target_cpu=006\n     rcu_preempt-7     (    7) [006] d..5 6824711.826616: sched_wakeup: comm=rcuop/4 pid=44 prio=120 target_cpu=006\n     rcu_preempt-7     (    7) [006] d..3 6824711.826620: sched_switch: prev_comm=rcu_preempt prev_pid=7 prev_prio=120 prev_state=S ==> next_comm=rcuop/4 next_pid=44 next_prio=120\n         rcuop/4-44    (   44) [006] d..3 6824711.826622: sched_waking: comm=rcuop/5 pid=52 prio=120 target_cpu=002\n   UsbFfs-worker-20308 (20305) [002] d.h2 6824711.826633: sched_wakeup: comm=rcuop/5 pid=52 prio=120 target_cpu=002\n   UsbFfs-worker-20308 (20305) [002] d..3 6824711.826638: sched_waking: comm=adbd pid=20305 prio=120 target_cpu=004\n   UsbFfs-worker-20308 (20305) [002] d..4 6824711.826647: sched_wakeup: comm=adbd pid=20305 prio=120 target_cpu=002\n         rcuop/4-44    (   44) [006] d..3 6824711.826692: sched_switch: prev_comm=rcuop/4 prev_pid=44 prev_prio=120 prev_state=S ==> next_comm=rcu_sched next_pid=8 next_prio=120\n       rcu_sched-8     (    8) [006] d..4 6824711.826694: sched_waking: comm=rcuos/0 pid=11 prio=120 target_cpu=003\n   UsbFfs-worker-20308 (20305) [002] d..3 6824711.826707: sched_switch: prev_comm=UsbFfs-worker prev_pid=20308 prev_prio=120 prev_state=S ==> next_comm=rcuop/6 next_pid=60 next_prio=120\n       rcu_sched-8     (    8) [006] d..3 6824711.826708: sched_switch: prev_comm=rcu_sched prev_pid=8 prev_prio=120 prev_state=S ==> next_comm=swapper/6 next_pid=0 next_prio=120\n         rcuop/6-60    (   60) [002] d..3 6824711.826712: sched_waking: comm=rcuop/7 pid=68 prio=120 target_cpu=002\n          <idle>-0     (-----) [000] dnh3 6824711.826719: sched_wakeup: comm=rcuop/0 pid=10 prio=120 target_cpu=000\n          <idle>-0     (-----) [000] d..3 6824711.826730: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=rcuop/0 next_pid=10 next_prio=120\n         rcuop/6-60    (   60) [002] d..4 6824711.826731: sched_wakeup: comm=rcuop/7 pid=68 prio=120 target_cpu=002\n         rcuop/0-10    (   10) [000] d..3 6824711.826735: sched_waking: comm=rcuop/1 pid=20 prio=120 target_cpu=003\n         rcuop/0-10    (   10) [000] d..4 6824711.826754: sched_wakeup: comm=rcuop/1 pid=20 prio=120 target_cpu=003\n         rcuop/6-60    (   60) [002] d..3 6824711.826788: sched_switch: prev_comm=rcuop/6 prev_pid=60 prev_prio=120 prev_state=S ==> next_comm=rcuop/5 next_pid=52 next_prio=120\n         rcuop/0-10    (   10) [000] d..3 6824711.826810: sched_switch: prev_comm=rcuop/0 prev_pid=10 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120\n          <idle>-0     (-----) [003] dnh3 6824711.826810: sched_wakeup: comm=rcuos/0 pid=11 prio=120 target_cpu=003\n          <idle>-0     (-----) [003] d..3 6824711.826820: sched_switch: prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=rcuos/0 next_pid=11 next_prio=120\n         rcuos/0-11    (   11) [003] d..3 6824711.826825: sched_waking: comm=rcuos/1 pid=21 prio=120 target_cpu=001\n         rcuos/0-11    (   11) [003] d..4 6824711.826846: sched_wakeup: comm=rcuos/1 pid=21 prio=120 target_cpu=001\n         rcuos/0-11    (   11) [003] d..3 6824711.826853: sched_switch: prev_comm=rcuos/0 prev_pid=11 prev_prio=120 prev_state=S ==> next_comm=rcuop/1 next_pid=20 next_prio=120\n",
  "traceEvents": [
  {"ph":"i", "pid":4294967295, "tid":4294967295, "ts":6824711427943.700, "s":"p", "name":"HardFault", "cat":"MSNT_SystemTrace", "args":{"InitialTime": 18994268107, "ReadOffset": 659456, "VirtualAddress": 140728020457668, "FileObject": 18446683096841889792, "TThreadId": 5492, "ByteCount": 4096}},
  {"ph":"X", "pid":9356, "tid":10904, "ts":6824711470348.800, "name":"VidSchDdiNotifyInterrupt", "cat":"Microsoft-Windows-DxgKrnl", "id":"4015", "dur":1.600, "args":{"Function": 4015}},
  {"ph":"X", "pid":9356, "tid":10904, "ts":6824711470327.900, "name":"DpiFdoMessageInterruptRoutine", "cat":"Microsoft-Windows-DxgKrnl", "id":"4014", "dur":28.900, "args":{"Function": 4014}},
  {"ph":"X", "pid":9356, "tid":10904, "ts":6824711470364.600, "name":"RuntimePowerManagement", "cat":"Microsoft-Windows-DxgKrnl", "id":"-139606685160271742", "dur":0.400, "args":{"AdapterHandle": 18446618238319599616, "ComponentIndex": 0}},
  {"ph":"X", "pid":9356, "tid":10904, "ts":6824711470360.600, "name":"DdiNotifyDpc", "cat":"Microsoft-Windows-DxgKrnl", "id":"5043", "dur":6.600, "args":{"Function": 5043}},
  {"ph":"X", "pid":9356, "tid":10904, "ts":6824711470367.700, "name":"DdiNotifyDpc", "cat":"Microsoft-Windows-DxgKrnl", "id":"5043", "dur":0.300, "args":{"Function": 5043}},
  {"ph":"X", "pid":9356, "tid":10904, "ts":6824711470358.400, "name":"DpiDpcForIsr", "cat":"Microsoft-Windows-DxgKrnl", "id":"4013", "dur":9.900, "args":{"Function": 4013}},
  {"ph":"X", "pid":4, "tid":992, "ts":6824711470427.700, "name":"DdiSubmitCommandVirtual", "cat":"Microsoft-Windows-DxgKrnl", "id":"5063", "dur":24.800, "args":{"Function": 5063}},
   ]
}