OSDN Git Service

perf pmu: Use perf_pmu__open_file() and perf_pmu__scan_file()
authorJames Clark <james.clark@arm.com>
Fri, 20 Jan 2023 14:36:55 +0000 (14:36 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 22 Jan 2023 21:17:32 +0000 (18:17 -0300)
commitd50a79cd0f391cbfdc3d9a6165e247d084f94dd3
tree0ea966d9eaa89a5144f1f6cb8e7e2ecc1a427398
parentf8ad6018ce3c065a706b187cdc4520975969660e
perf pmu: Use perf_pmu__open_file() and perf_pmu__scan_file()

Remove some code that duplicates existing methods. Copy strings where
const strings are required.

No functional changes.

Committer notes:

Add a stub for erf_pmu__scan_file() in tools/perf/util/python.c not to
drag tools/perf/util/pmu.c into the python binding.

This fixes 'perf test python' at this point in this patchset.

Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
Acked-by: Suzuki Poulouse <suzuki.poulose@arm.com>
Tested-by: Tanmay Jagdale <tanmay@marvell.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Bharat Bhushan <bbhushan2@marvell.com>
Cc: George Cherian <gcherian@marvell.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Linu Cherian <lcherian@marvell.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Cc: Will Deacon <will@kernel.org>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20230120143702.4035046-3-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cputopo.c
tools/perf/util/pmu-hybrid.c
tools/perf/util/pmu.c
tools/perf/util/pmu.h
tools/perf/util/python.c