diff mbox series

[v3,3/3] perf pmu: Remove unused function

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

Commit Message

James Clark Sept. 13, 2023, 3:33 p.m. UTC
pmu_events_table__find() is no longer used so remove it and its Arm
specific version.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: James Clark <james.clark@arm.com>
---
 tools/perf/arch/arm64/util/pmu.c | 10 ----------
 tools/perf/util/pmu.c            |  5 -----
 tools/perf/util/pmu.h            |  1 -
 3 files changed, 16 deletions(-)

Comments

John Garry Sept. 14, 2023, 6:41 a.m. UTC | #1
On 13/09/2023 16:33, James Clark wrote:
> pmu_events_table__find() is no longer used so remove it and its Arm
> specific version.
> 
> Reviewed-by: Ian Rogers <irogers@google.com>
> Signed-off-by: James Clark <james.clark@arm.com>
> ---

You really should put the name of the function in the subject. Apart 
from that:

Reviewed-by: John Garry <john.g.garry@oracle.com>

>   tools/perf/arch/arm64/util/pmu.c | 10 ----------
>   tools/perf/util/pmu.c            |  5 -----
>   tools/perf/util/pmu.h            |  1 -
>   3 files changed, 16 deletions(-)
> 
> diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> index 3099f5f448ba..2a4eab2d160e 100644
> --- a/tools/perf/arch/arm64/util/pmu.c
> +++ b/tools/perf/arch/arm64/util/pmu.c
> @@ -24,16 +24,6 @@ const struct pmu_metrics_table *pmu_metrics_table__find(void)
>   	return NULL;
>   }
>   
> -const struct pmu_events_table *pmu_events_table__find(void)
> -{
> -	struct perf_pmu *pmu = perf_pmus__find_core_pmu();
> -
> -	if (pmu)
> -		return perf_pmu__find_events_table(pmu);
> -
> -	return NULL;
> -}
> -
>   double perf_pmu__cpu_slots_per_cycle(void)
>   {
>   	char path[PATH_MAX];
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index f50a5636633f..0d81c059c91c 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -776,11 +776,6 @@ char *perf_pmu__getcpuid(struct perf_pmu *pmu)
>   	return cpuid;
>   }
>   
> -__weak const struct pmu_events_table *pmu_events_table__find(void)
> -{
> -	return perf_pmu__find_events_table(NULL);
> -}
> -
>   __weak const struct pmu_metrics_table *pmu_metrics_table__find(void)
>   {
>   	return perf_pmu__find_metrics_table(NULL);
> diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
> index d7b46085642d..04b317b17d66 100644
> --- a/tools/perf/util/pmu.h
> +++ b/tools/perf/util/pmu.h
> @@ -238,7 +238,6 @@ void pmu_add_cpu_aliases_table(struct perf_pmu *pmu,
>   			       const struct pmu_events_table *table);
>   
>   char *perf_pmu__getcpuid(struct perf_pmu *pmu);
> -const struct pmu_events_table *pmu_events_table__find(void);
>   const struct pmu_metrics_table *pmu_metrics_table__find(void);
>   
>   int perf_pmu__convert_scale(const char *scale, char **end, double *sval);
James Clark Sept. 14, 2023, 10:39 a.m. UTC | #2
On 14/09/2023 07:41, John Garry wrote:
> On 13/09/2023 16:33, James Clark wrote:
>> pmu_events_table__find() is no longer used so remove it and its Arm
>> specific version.
>>
>> Reviewed-by: Ian Rogers <irogers@google.com>
>> Signed-off-by: James Clark <james.clark@arm.com>
>> ---
> 
> You really should put the name of the function in the subject. Apart
> from that:
> 
> Reviewed-by: John Garry <john.g.garry@oracle.com>
> 

Noted, will do next time. Thanks for the reviews.

>>   tools/perf/arch/arm64/util/pmu.c | 10 ----------
>>   tools/perf/util/pmu.c            |  5 -----
>>   tools/perf/util/pmu.h            |  1 -
>>   3 files changed, 16 deletions(-)
>>
>> diff --git a/tools/perf/arch/arm64/util/pmu.c
>> b/tools/perf/arch/arm64/util/pmu.c
>> index 3099f5f448ba..2a4eab2d160e 100644
>> --- a/tools/perf/arch/arm64/util/pmu.c
>> +++ b/tools/perf/arch/arm64/util/pmu.c
>> @@ -24,16 +24,6 @@ const struct pmu_metrics_table
>> *pmu_metrics_table__find(void)
>>       return NULL;
>>   }
>>   -const struct pmu_events_table *pmu_events_table__find(void)
>> -{
>> -    struct perf_pmu *pmu = perf_pmus__find_core_pmu();
>> -
>> -    if (pmu)
>> -        return perf_pmu__find_events_table(pmu);
>> -
>> -    return NULL;
>> -}
>> -
>>   double perf_pmu__cpu_slots_per_cycle(void)
>>   {
>>       char path[PATH_MAX];
>> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
>> index f50a5636633f..0d81c059c91c 100644
>> --- a/tools/perf/util/pmu.c
>> +++ b/tools/perf/util/pmu.c
>> @@ -776,11 +776,6 @@ char *perf_pmu__getcpuid(struct perf_pmu *pmu)
>>       return cpuid;
>>   }
>>   -__weak const struct pmu_events_table *pmu_events_table__find(void)
>> -{
>> -    return perf_pmu__find_events_table(NULL);
>> -}
>> -
>>   __weak const struct pmu_metrics_table *pmu_metrics_table__find(void)
>>   {
>>       return perf_pmu__find_metrics_table(NULL);
>> diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
>> index d7b46085642d..04b317b17d66 100644
>> --- a/tools/perf/util/pmu.h
>> +++ b/tools/perf/util/pmu.h
>> @@ -238,7 +238,6 @@ void pmu_add_cpu_aliases_table(struct perf_pmu *pmu,
>>                      const struct pmu_events_table *table);
>>     char *perf_pmu__getcpuid(struct perf_pmu *pmu);
>> -const struct pmu_events_table *pmu_events_table__find(void);
>>   const struct pmu_metrics_table *pmu_metrics_table__find(void);
>>     int perf_pmu__convert_scale(const char *scale, char **end, double
>> *sval);
>
diff mbox series

Patch

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 3099f5f448ba..2a4eab2d160e 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -24,16 +24,6 @@  const struct pmu_metrics_table *pmu_metrics_table__find(void)
 	return NULL;
 }
 
-const struct pmu_events_table *pmu_events_table__find(void)
-{
-	struct perf_pmu *pmu = perf_pmus__find_core_pmu();
-
-	if (pmu)
-		return perf_pmu__find_events_table(pmu);
-
-	return NULL;
-}
-
 double perf_pmu__cpu_slots_per_cycle(void)
 {
 	char path[PATH_MAX];
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index f50a5636633f..0d81c059c91c 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -776,11 +776,6 @@  char *perf_pmu__getcpuid(struct perf_pmu *pmu)
 	return cpuid;
 }
 
-__weak const struct pmu_events_table *pmu_events_table__find(void)
-{
-	return perf_pmu__find_events_table(NULL);
-}
-
 __weak const struct pmu_metrics_table *pmu_metrics_table__find(void)
 {
 	return perf_pmu__find_metrics_table(NULL);
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
index d7b46085642d..04b317b17d66 100644
--- a/tools/perf/util/pmu.h
+++ b/tools/perf/util/pmu.h
@@ -238,7 +238,6 @@  void pmu_add_cpu_aliases_table(struct perf_pmu *pmu,
 			       const struct pmu_events_table *table);
 
 char *perf_pmu__getcpuid(struct perf_pmu *pmu);
-const struct pmu_events_table *pmu_events_table__find(void);
 const struct pmu_metrics_table *pmu_metrics_table__find(void);
 
 int perf_pmu__convert_scale(const char *scale, char **end, double *sval);