mbox series

[v3,0/3] perf: strcmp_cpuid_str() expression fixups

Message ID 20230913153355.138331-1-james.clark@arm.com (mailing list archive)
Headers show
Series perf: strcmp_cpuid_str() expression fixups | expand

Message

James Clark Sept. 13, 2023, 3:33 p.m. UTC
Set of fixes related to the comments here [1]. Mainly cleanups,
additional tests and refactoring since adding the new strcmp_cpuid_str()
metric expression.

I added the string replace function to the perf utils
rather than tools/lib/string.c because it didn't seem
easy to add tests for tools/lib.

[1]: https://lore.kernel.org/linux-arm-kernel/CAP-5=fVnUx0BnJC7X1rrm42OD7Bk=ZsHWNwAZMBYyB7yWhBfhQ@mail.gmail.com/
[2]: https://lore.kernel.org/linux-perf-users/ZQC7da2AM9ih8RMz@kernel.org/

---
Changes since v2:
  * Drop patches that were already applied (which makes the cover letter
    mostly redundant)
  * Avoid generating the compiler warning reported here [2]

Changes since v1:
  * s -> haystack
  * find -> needle

James Clark (3):
  perf pmu: Move pmu__find_core_pmu() to pmus.c
  perf pmus: Simplify perf_pmus__find_core_pmu()
  perf pmu: Remove unused function

 tools/perf/arch/arm64/util/pmu.c | 20 ++++++++------------
 tools/perf/tests/expr.c          |  2 +-
 tools/perf/util/expr.c           |  2 +-
 tools/perf/util/pmu.c            | 22 ----------------------
 tools/perf/util/pmu.h            |  3 +--
 tools/perf/util/pmus.c           |  8 +++++++-
 6 files changed, 18 insertions(+), 39 deletions(-)

Comments

Namhyung Kim Sept. 17, 2023, 5:24 a.m. UTC | #1
Hello,

On Wed, Sep 13, 2023 at 8:34 AM James Clark <james.clark@arm.com> wrote:
>
> Set of fixes related to the comments here [1]. Mainly cleanups,
> additional tests and refactoring since adding the new strcmp_cpuid_str()
> metric expression.
>
> I added the string replace function to the perf utils
> rather than tools/lib/string.c because it didn't seem
> easy to add tests for tools/lib.
>
> [1]: https://lore.kernel.org/linux-arm-kernel/CAP-5=fVnUx0BnJC7X1rrm42OD7Bk=ZsHWNwAZMBYyB7yWhBfhQ@mail.gmail.com/
> [2]: https://lore.kernel.org/linux-perf-users/ZQC7da2AM9ih8RMz@kernel.org/
>
> ---
> Changes since v2:
>   * Drop patches that were already applied (which makes the cover letter
>     mostly redundant)
>   * Avoid generating the compiler warning reported here [2]
>
> Changes since v1:
>   * s -> haystack
>   * find -> needle
>
> James Clark (3):
>   perf pmu: Move pmu__find_core_pmu() to pmus.c
>   perf pmus: Simplify perf_pmus__find_core_pmu()
>   perf pmu: Remove unused function

Applied to perf-tools-next, thanks!