• Frederic Weisbecker's avatar
    tracing/function-graph-tracer: fix traces weirdness while absolute time printing · d1f9cbd7
    Frederic Weisbecker authored
    
    
    Impact: trace output cleanup/reordering
    
    When an interrupt occurs and and the abstime option is selected:
    
      echo funcgraph-abstime > /debug/tracing/trace_options
    
    then we observe broken traces:
    
    30581.025422 |   0)   Xorg-4291    |   0.503 us    |      idle_cpu();
    30581.025424 |   0)   Xorg-4291    |   2.576 us    |    }
    30581.025424 |   0)   Xorg-4291    | + 75.771 us   |  }
     0)   Xorg-4291    |   <========== |
    30581.025425 |   0)   Xorg-4291    |               |  schedule() {
    30581.025426 |   0)   Xorg-4291    |               |    __schedule() {
    30581.025426 |   0)   Xorg-4291    |   0.705 us    |      _spin_lock_irq();
    
    With this patch, the interrupts output better adapts
    to absolute time printing:
    
      414.856543 |   1)   Xorg-4279    |   8.816 us    |                        }
      414.856544 |   1)   Xorg-4279    |   0.525 us    |                        rcu_irq_exit();
      414.856545 |   1)   Xorg-4279    |   0.526 us    |                        idle_cpu();
      414.856546 |   1)   Xorg-4279    | + 12.157 us   |                      }
      414.856549 |   1)   Xorg-4279    | ! 104.114 us  |                    }
      414.856549 |   1)   Xorg-4279    |   <========== |
      414.856549 |   1)   Xorg-4279    | ! 107.944 us  |                  }
      414.856550 |   1)   Xorg-4279    | ! 137.010 us  |                }
      414.856551 |   1)   Xorg-4279    |   0.624 us    |                _read_unlock();
      414.856552 |   1)   Xorg-4279    | ! 140.930 us  |              }
      414.856552 |   1)   Xorg-4279    | ! 166.159 us  |            }
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    d1f9cbd7
trace_functions_graph.c 20.3 KB