linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Like Xu <like.xu.linux@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>,
	"Namhyung Kim" <namhyung@kernel.org>,
	<linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf jevents: Fix sys_event_tables to be freed like arch_std_events
Date: Tue, 28 Sep 2021 13:49:20 +0100	[thread overview]
Message-ID: <c547bc2d-ab7c-1e89-5d12-bd5d875f7aa5@huawei.com> (raw)
In-Reply-To: <YVMB5kt8XG+OdJ1M@kernel.org>

On 28/09/2021 12:52, Arnaldo Carvalho de Melo wrote:
> Em Tue, Sep 28, 2021 at 06:29:38PM +0800, Like Xu escreveu:
>> From: Like Xu <likexu@tencent.com>
>>
>> The compiler reports that free_sys_event_tables() is dead code. But
>> according to the semantics, the "LIST_HEAD(arch_std_events)" should
>> also be released, just like we do with 'arch_std_events' in the main().
> 
> Thanks, applied.
> 
> - Arnaldo
> 

If not too late:
Reviewed-by: John Garry <john.garry@huawei.com>

I think that it could be a good idea to raise gcc warning level to 
detect unused static functions, like this was

thanks

>   
>> Fixes: e9d32c1bf0cd7a98 ("perf vendor events: Add support for arch standard events")
>> Signed-off-by: Like Xu <likexu@tencent.com>
>> ---
>>   tools/perf/pmu-events/jevents.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
>> index 6731b3cf0c2f..7c887d37b893 100644
>> --- a/tools/perf/pmu-events/jevents.c
>> +++ b/tools/perf/pmu-events/jevents.c
>> @@ -1285,6 +1285,7 @@ int main(int argc, char *argv[])
>>   	}
>>   
>>   	free_arch_std_events();
>> +	free_sys_event_tables();
>>   	free(mapfile);
>>   	return 0;
>>   
>> @@ -1306,6 +1307,7 @@ int main(int argc, char *argv[])
>>   		create_empty_mapping(output_file);
>>   err_out:
>>   	free_arch_std_events();
>> +	free_sys_event_tables();
>>   	free(mapfile);
>>   	return ret;
>>   }
>> -- 
>> 2.32.0
> 


  parent reply	other threads:[~2021-09-28 12:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 10:29 [PATCH] perf jevents: Fix sys_event_tables to be freed like arch_std_events Like Xu
2021-09-28 11:52 ` Arnaldo Carvalho de Melo
2021-09-28 11:53   ` Like Xu
2021-09-28 12:37     ` Arnaldo Carvalho de Melo
2021-09-28 12:49   ` John Garry [this message]
2021-09-28 13:16     ` Arnaldo Carvalho de Melo
2021-09-28 13:22       ` Arnaldo Carvalho de Melo
2021-09-28 13:32         ` John Garry
2021-09-28 17:56           ` Arnaldo Carvalho de Melo
2021-09-28 20:30             ` John Garry
2021-10-11 17:03               ` perf tools jevents build flags (was Re: [PATCH] perf jevents: Fix sys_event_tables to be freed like arch_std_events) John Garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c547bc2d-ab7c-1e89-5d12-bd5d875f7aa5@huawei.com \
    --to=john.garry@huawei.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=like.xu.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).