perfetto icon indicating copy to clipboard operation
perfetto copied to clipboard

traceconv lose process name

Open lbknxy opened this issue 3 years ago • 5 comments

Hi, I convert perfetto trace file to systarce by traceconv, but the result file lose all process names, check my pictures: result

lbknxy avatar Jun 15 '23 06:06 lbknxy

Please attach a trace to help with debugging, thanks!

chromy avatar Jun 15 '23 07:06 chromy

I think this is WAI no? systrace has only thread names, not processes. the perfetto -> systrace is a lossy conversion.

This is how ftrace looks like

#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
          <idle>-0     [005] d...  2440.603828: sched_switch: prev_comm=swapper/5 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=snapshot-test-2 next_pid=2242 next_prio=120
           sleep-2242  [005] d...  2440.603846: sched_switch: prev_comm=snapshot-test-2 prev_pid=2242 prev_prio=120 prev_state=R ==> next_comm=kworker/5:1 next_pid=60 next_prio=120
[...]
          <idle>-0     [002] d...  2440.707230: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=snapshot-test-2 next_pid=2229 next_prio=120

 # cat trace

In this case snapshot-test-2 is the name of the thread, not name of the process. There is no process name.

primiano avatar Jun 15 '23 11:06 primiano

Please attach a trace to help with debugging, thanks!

traces.zip

I capture some new trace files and upload as traces.zip: perfetto.trace capture by perfetto perfetto_2_systrace.trace convert with traceconv [traceconv systrace perfetto.trace perfetto_2_systrace.trace] systrace.html capture by systrace.py

lbknxy avatar Jun 16 '23 05:06 lbknxy

I think this is WAI no? systrace has only thread names, not processes. the perfetto -> systrace is a lossy conversion.

This is how ftrace looks like

#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
          <idle>-0     [005] d...  2440.603828: sched_switch: prev_comm=swapper/5 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=snapshot-test-2 next_pid=2242 next_prio=120
           sleep-2242  [005] d...  2440.603846: sched_switch: prev_comm=snapshot-test-2 prev_pid=2242 prev_prio=120 prev_state=R ==> next_comm=kworker/5:1 next_pid=60 next_prio=120
[...]
          <idle>-0     [002] d...  2440.707230: sched_switch: prev_comm=swapper/2 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=snapshot-test-2 next_pid=2229 next_prio=120

 # cat trace

In this case snapshot-test-2 is the name of the thread, not name of the process. There is no process name.

May you are right, almost all process in systrace.html are not have a name, but there are also processes, such as SurfaceFinger does has a name.

lbknxy avatar Jun 16 '23 05:06 lbknxy

hello ?

lbknxy avatar Jul 06 '23 08:07 lbknxy