Public bug reported:

This upstream patch from v6.19 resolves an issue (injected with a v6.16
commit) when running the perf command to measure duration time.

When running in interval mode every third count of a time event isn't
showing properly:
```
$ perf stat -e duration_time -a -I 1000
     1.001082862      1,002,290,425      duration_time
     2.004264262      1,003,183,516      duration_time
     3.007381401      <not counted>      duration_time
     4.011160141      1,003,705,631      duration_time
     5.014515385      1,003,290,110      duration_time
     6.018539680      <not counted>      duration_time
     7.022065321      1,003,591,720      duration_time
```

Patch: 
https://github.com/torvalds/linux/commit/bdf96c4ecd69523d97c98e47284caddde20b1df7
LKML: https://lore.kernel.org/all/[email protected]/

Backport the patch to linux-nvidia-6.17.

Verified by running the perf command with the fix:
```
nvidia@GB200:~/mochs/perf_backport_test/NV-Kernels/tools/perf$ ./perf stat -e 
duration_time -I 1000
./perf stat -e duration_time -I 1000
#           time             counts unit events
     1.001015119         1008476614      duration_time                          
                               
     2.004164516         1003143445      duration_time                          
                               
     3.008193019         1004027831      duration_time                          
                               
     4.012104305         1003915414      duration_time                          
                               
     5.016211177         1004100920      duration_time                          
                               
     6.019747039         1003552054      duration_time                          
                               
     6.674403830          654646104      duration_time
```

** Affects: linux-nvidia-6.17 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2158038

Title:
  Backport perf tool_pmu: Use old_count when computing count values for
  time events

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-6.17/+bug/2158038/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to