Commit 8d4b6d3
perf pmu: Lazily load sysfs aliases
Don't load sysfs aliases for a PMU when the PMU is first created, defer
until an alias needs to be found. For the pmu-scan benchmark, average
core PMU scanning is reduced by 30.8%, and average PMU scanning by
12.6%.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230824041330.266337-17-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent 7b723db commit 8d4b6d3
3 files changed
Lines changed: 46 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
| |||
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
| 592 | + | |
591 | 593 | | |
592 | 594 | | |
593 | 595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
423 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
424 | 428 | | |
425 | 429 | | |
426 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
427 | 434 | | |
428 | 435 | | |
429 | 436 | | |
| |||
505 | 512 | | |
506 | 513 | | |
507 | 514 | | |
508 | | - | |
| 515 | + | |
509 | 516 | | |
510 | 517 | | |
511 | 518 | | |
| |||
611 | 618 | | |
612 | 619 | | |
613 | 620 | | |
614 | | - | |
615 | | - | |
| 621 | + | |
| 622 | + | |
616 | 623 | | |
617 | | - | |
| 624 | + | |
618 | 625 | | |
| 626 | + | |
619 | 627 | | |
620 | 628 | | |
621 | | - | |
| 629 | + | |
| 630 | + | |
622 | 631 | | |
623 | | - | |
624 | | - | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
625 | 646 | | |
| 647 | + | |
626 | 648 | | |
627 | 649 | | |
628 | 650 | | |
| |||
637 | 659 | | |
638 | 660 | | |
639 | 661 | | |
640 | | - | |
| 662 | + | |
641 | 663 | | |
642 | 664 | | |
643 | 665 | | |
| |||
655 | 677 | | |
656 | 678 | | |
657 | 679 | | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
| 680 | + | |
| 681 | + | |
677 | 682 | | |
678 | 683 | | |
679 | 684 | | |
| |||
1017 | 1022 | | |
1018 | 1023 | | |
1019 | 1024 | | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | 1025 | | |
1028 | 1026 | | |
1029 | 1027 | | |
| |||
1438 | 1436 | | |
1439 | 1437 | | |
1440 | 1438 | | |
1441 | | - | |
| 1439 | + | |
1442 | 1440 | | |
1443 | 1441 | | |
1444 | 1442 | | |
| |||
1447 | 1445 | | |
1448 | 1446 | | |
1449 | 1447 | | |
1450 | | - | |
| 1448 | + | |
1451 | 1449 | | |
1452 | 1450 | | |
1453 | 1451 | | |
| |||
1620 | 1618 | | |
1621 | 1619 | | |
1622 | 1620 | | |
1623 | | - | |
| 1621 | + | |
1624 | 1622 | | |
1625 | 1623 | | |
1626 | 1624 | | |
| |||
1629 | 1627 | | |
1630 | 1628 | | |
1631 | 1629 | | |
1632 | | - | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
1633 | 1636 | | |
1634 | 1637 | | |
1635 | 1638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
0 commit comments