• N
    perf lock: Print wait times with unit · ab010176
    Namhyung Kim 提交于
    Currently it only prints the time in nsec but it's a bit hard to read
    and takes longer in the screen.  We can change it to use different units
    and keep the number small to save the space.
    
    Before:
    
      $ perf lock report
    
                    Name   acquired  contended   avg wait (ns) total wait (ns)   max wait (ns)   min wait (ns)
    
            jiffies_lock        433         32            2778           88908           13570             692
       &lruvec->lru_lock        747          5           11254           56272           18317            1412
          slock-AF_INET6          7          1           23543           23543           23543           23543
        &newf->file_lock        706         15            1025           15388            2279             618
          slock-AF_INET6          8          1           10379           10379           10379           10379
             &rq->__lock       2143          5            2037           10185            3462             939
    
    After:
                    Name   acquired  contended     avg wait   total wait     max wait     min wait
    
            jiffies_lock        433         32      2.78 us     88.91 us     13.57 us       692 ns
       &lruvec->lru_lock        747          5     11.25 us     56.27 us     18.32 us      1.41 us
          slock-AF_INET6          7          1     23.54 us     23.54 us     23.54 us     23.54 us
        &newf->file_lock        706         15      1.02 us     15.39 us      2.28 us       618 ns
          slock-AF_INET6          8          1     10.38 us     10.38 us     10.38 us     10.38 us
             &rq->__lock       2143          5      2.04 us     10.19 us      3.46 us       939 ns
    Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
    Acked-by: NIan Rogers <irogers@google.com>
    Cc: Boqun Feng <boqun.feng@gmail.com>
    Cc: Davidlohr Bueso <dave@stgolabs.net>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Waiman Long <longman@redhat.com>
    Cc: Will Deacon <will@kernel.org>
    Link: https://lore.kernel.org/r/20220615163222.1275500-2-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    ab010176
builtin-lock.c 27.8 KB