• C
    perf ftrace: Detect workload failure · 51a09d8f
    Changbin Du 提交于
    Currently there's no error message prompted if we failed to start
    workload.  And we still get some trace which is confusing. Let's tell
    users what happened.
    
    Committer testing:
    
    Before:
    
        # perf ftrace nonsense |& head
         5)               |  switch_mm_irqs_off() {
         5)   0.400 us    |    load_new_mm_cr3();
         5)   3.261 us    |  }
         ------------------------------------------
         5)    <idle>-0    =>   <...>-3494
         ------------------------------------------
    
         5)               |  finish_task_switch() {
         5)   ==========> |
         5)               |    smp_irq_work_interrupt() {
        # type nonsense
        -bash: type: nonsense: not found
        #
    
    After:
    
      # perf ftrace nonsense |& head
      workload failed: No such file or directory
      # type nonsense
      -bash: type: nonsense: not found
      #
    Signed-off-by: NChangbin Du <changbin.du@gmail.com>
    Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Link: http://lore.kernel.org/lkml/20200510150628.16610-3-changbin.du@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    51a09d8f
builtin-ftrace.c 11.9 KB