Commit afbde83
committed
perf tool_pmu: Use old_count when computing count values for time events
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
```
The regression came in with a different fix, found through bisection,
commit 68cb156 ("perf tool_pmu: Fix aggregation on
duration_time"). The issue is caused by the enabled and running time
of the event matching the old_count's and creating a delta of 0, which
is indicative of an error.
Fixes: 68cb156 ("perf tool_pmu: Fix aggregation on duration_time")
Signed-off-by: Ian Rogers <[email protected]>1 parent cd69558 commit afbde83
2 files changed
+46
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | 285 | | |
287 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
288 | 292 | | |
289 | | - | |
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | | - | |
| 297 | + | |
295 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
296 | 306 | | |
297 | 307 | | |
298 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
437 | 459 | | |
438 | 460 | | |
439 | 461 | | |
440 | | - | |
441 | | - | |
| 462 | + | |
442 | 463 | | |
443 | 464 | | |
444 | 465 | | |
445 | 466 | | |
446 | 467 | | |
| 468 | + | |
| 469 | + | |
447 | 470 | | |
448 | 471 | | |
449 | 472 | | |
| |||
454 | 477 | | |
455 | 478 | | |
456 | 479 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
461 | 483 | | |
462 | 484 | | |
463 | 485 | | |
464 | 486 | | |
465 | 487 | | |
466 | 488 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 489 | + | |
476 | 490 | | |
| 491 | + | |
477 | 492 | | |
478 | 493 | | |
479 | 494 | | |
| |||
489 | 504 | | |
490 | 505 | | |
491 | 506 | | |
| 507 | + | |
492 | 508 | | |
493 | 509 | | |
494 | | - | |
495 | 510 | | |
496 | 511 | | |
497 | 512 | | |
| |||
525 | 540 | | |
526 | 541 | | |
527 | 542 | | |
528 | | - | |
| 543 | + | |
529 | 544 | | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 545 | + | |
539 | 546 | | |
540 | 547 | | |
541 | 548 | | |
| |||
0 commit comments