linux-stable/tools
Arnaldo Carvalho de Melo 9d1a84063a perf ftrace latency: Fix unit on histogram first entry when using --use-nsec
[ Upstream commit 064d569e20 ]

The use_nsec arg wasn't being taken into account when printing the first
histogram entry, fix it:

  root@number:~# perf ftrace latency --use-nsec -T switch_mm_irqs_off -a sleep 2
  #   DURATION     |      COUNT | GRAPH                                          |
       0 - 1    us |          0 |                                                |
       1 - 2    ns |          0 |                                                |
       2 - 4    ns |          0 |                                                |
       4 - 8    ns |          0 |                                                |
       8 - 16   ns |          0 |                                                |
      16 - 32   ns |          0 |                                                |
      32 - 64   ns |        125 |                                                |
      64 - 128  ns |        335 |                                                |
     128 - 256  ns |       2155 | ####                                           |
     256 - 512  ns |       9996 | ###################                            |
     512 - 1024 ns |       4958 | #########                                      |
       1 - 2    us |       4636 | #########                                      |
       2 - 4    us |       1053 | ##                                             |
       4 - 8    us |         15 |                                                |
       8 - 16   us |          1 |                                                |
      16 - 32   us |          0 |                                                |
      32 - 64   us |          0 |                                                |
      64 - 128  us |          0 |                                                |
     128 - 256  us |          0 |                                                |
     256 - 512  us |          0 |                                                |
     512 - 1024 us |          0 |                                                |
       1 - ...  ms |          0 |                                                |
  root@number:~#

After:

  root@number:~# perf ftrace latency --use-nsec -T switch_mm_irqs_off -a sleep 2
  #   DURATION     |      COUNT | GRAPH                                          |
       0 - 1    ns |          0 |                                                |
       1 - 2    ns |          0 |                                                |
       2 - 4    ns |          0 |                                                |
       4 - 8    ns |          0 |                                                |
       8 - 16   ns |          0 |                                                |
      16 - 32   ns |          0 |                                                |
      32 - 64   ns |         19 |                                                |
      64 - 128  ns |         94 |                                                |
     128 - 256  ns |       2191 | ####                                           |
     256 - 512  ns |       9719 | ####################                           |
     512 - 1024 ns |       5330 | ###########                                    |
       1 - 2    us |       4104 | ########                                       |
       2 - 4    us |        807 | #                                              |
       4 - 8    us |          9 |                                                |
       8 - 16   us |          0 |                                                |
      16 - 32   us |          0 |                                                |
      32 - 64   us |          0 |                                                |
      64 - 128  us |          0 |                                                |
     128 - 256  us |          0 |                                                |
     256 - 512  us |          0 |                                                |
     512 - 1024 us |          0 |                                                |
       1 - ...  ms |          0 |                                                |
  root@number:~#

Fixes: 84005bb614 ("perf ftrace latency: Add -n/--use-nsec option")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/r/ZyE3frB-hMXHCnMO@x1
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-05 13:53:48 +01:00
..
accounting
arch tools/x86/kcpuid: Protect against faulty "max subleaf" values 2024-10-10 12:03:19 +02:00
bootconfig
bpf bpf, bpftool: Fix incorrect disasm pc 2024-12-05 13:53:19 +01:00
build perf build: Fix build feature-dwarf_getlocations fail for old libdw 2024-10-17 15:26:32 +02:00
certs
cgroup proc: rewrite stable_page_flags() 2024-04-25 20:56:15 -07:00
counter
crypto
debugging
firewire
firmware
gpio gpio: add sloppy logic analyzer using polling 2024-07-01 10:54:11 +02:00
hv tools/hv: Add memory allocation check in hv_fcopy_start 2024-10-10 12:03:38 +02:00
iio tools/iio: Add memory allocation failure check for trigger_name 2024-10-17 15:26:40 +02:00
include bpf: Add the missing BPF_LINK_TYPE invocation for sockmap 2024-11-01 02:02:38 +01:00
kvm/kvm_stat
laptop
leds
lib libbpf: move global data mmap()'ing into bpf_object__load() 2024-12-05 13:53:17 +01:00
memory-model kcsan: Add __data_racy documentation and module description 2024-07-15 15:44:40 -07:00
mm tools/mm: fix compile error 2024-11-22 15:39:50 +01:00
net/ynl tools/net/ynl: fix cli.py --subscribe feature 2024-09-05 14:56:45 -07:00
objtool objtool: Handle frame pointer related instructions 2024-10-04 16:38:37 +02:00
pci
pcmcia
perf perf ftrace latency: Fix unit on histogram first entry when using --use-nsec 2024-12-05 13:53:48 +01:00
power pm:cpupower: Add missing powercap_set_enabled() stub function 2024-10-04 16:37:26 +02:00
rcu tools/rcu: Add rcu-updaters.sh script 2024-06-06 11:44:42 -07:00
scripts
sound ASoC: dapm-graph: new tool to visualize DAPM state 2024-04-21 09:58:17 +09:00
spi
testing powerpc/vdso: Flag VDSO64 entry points as functions 2024-12-05 13:53:31 +01:00
thermal
time
tracing rtla/timerlat: Do not set params->user_workload with -U 2024-12-05 13:53:44 +01:00
usb usbip: tools: Fix detach_port() invalid port error path 2024-11-08 16:30:53 +01:00
verification tools/verification: Use pkg-config in lib_setup of Makefile.config 2024-07-17 13:14:51 -07:00
virtio tools/virtio: creating pipe assertion in vringh_test 2024-07-04 11:00:31 -04:00
wmi
workqueue
writeback writeback: add wb_monitor.py script to monitor writeback info on bdi 2024-05-05 17:53:51 -07:00
Makefile