linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample()
@ 2024-01-27  2:57 Yang Jihong
  2024-01-27  4:45 ` Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Jihong @ 2024-01-27  2:57 UTC (permalink / raw)
  To: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
	jolsa, irogers, adrian.hunter, linux-perf-users, linux-kernel
  Cc: yangjihong1

data->id has been initialized at line 2362, remove duplicate initialization.

Fixes: 3ad31d8a0df2 ("perf evsel: Centralize perf_sample initialization")
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
---
 tools/perf/util/evsel.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 4d14f14f2506..a0f36a6b8a2d 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -2363,7 +2363,6 @@ int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
 	data->period = evsel->core.attr.sample_period;
 	data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
 	data->misc    = event->header.misc;
-	data->id = -1ULL;
 	data->data_src = PERF_MEM_DATA_SRC_NONE;
 	data->vcpu = -1;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample()
  2024-01-27  2:57 [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample() Yang Jihong
@ 2024-01-27  4:45 ` Ian Rogers
  2024-01-27 19:28 ` Arnaldo Carvalho de Melo
  2024-02-02 20:57 ` Namhyung Kim
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Rogers @ 2024-01-27  4:45 UTC (permalink / raw)
  To: Yang Jihong
  Cc: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
	jolsa, adrian.hunter, linux-perf-users, linux-kernel

On Fri, Jan 26, 2024 at 7:02 PM Yang Jihong <yangjihong1@huawei.com> wrote:
>
> data->id has been initialized at line 2362, remove duplicate initialization.
>
> Fixes: 3ad31d8a0df2 ("perf evsel: Centralize perf_sample initialization")
> Signed-off-by: Yang Jihong <yangjihong1@huawei.com>

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample()
  2024-01-27  2:57 [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample() Yang Jihong
  2024-01-27  4:45 ` Ian Rogers
@ 2024-01-27 19:28 ` Arnaldo Carvalho de Melo
  2024-02-02 20:57 ` Namhyung Kim
  2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-01-27 19:28 UTC (permalink / raw)
  To: Yang Jihong
  Cc: peterz, mingo, namhyung, mark.rutland, alexander.shishkin, jolsa,
	irogers, adrian.hunter, linux-perf-users, linux-kernel

Em Sat, Jan 27, 2024 at 02:57:56AM +0000, Yang Jihong escreveu:
> data->id has been initialized at line 2362, remove duplicate initialization.
> 
> Fixes: 3ad31d8a0df2 ("perf evsel: Centralize perf_sample initialization")
> Signed-off-by: Yang Jihong <yangjihong1@huawei.com>

Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>

- Arnaldo

> ---
>  tools/perf/util/evsel.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 4d14f14f2506..a0f36a6b8a2d 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -2363,7 +2363,6 @@ int evsel__parse_sample(struct evsel *evsel, union perf_event *event,
>  	data->period = evsel->core.attr.sample_period;
>  	data->cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
>  	data->misc    = event->header.misc;
> -	data->id = -1ULL;
>  	data->data_src = PERF_MEM_DATA_SRC_NONE;
>  	data->vcpu = -1;
>  
> -- 
> 2.34.1
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample()
  2024-01-27  2:57 [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample() Yang Jihong
  2024-01-27  4:45 ` Ian Rogers
  2024-01-27 19:28 ` Arnaldo Carvalho de Melo
@ 2024-02-02 20:57 ` Namhyung Kim
  2 siblings, 0 replies; 4+ messages in thread
From: Namhyung Kim @ 2024-02-02 20:57 UTC (permalink / raw)
  To: alexander.shishkin, acme, linux-perf-users, jolsa, peterz,
	adrian.hunter, mingo, linux-kernel, mark.rutland, Yang Jihong,
	irogers

On Sat, 27 Jan 2024 02:57:56 +0000, Yang Jihong wrote:
> data->id has been initialized at line 2362, remove duplicate initialization.
> 
> 

Applied to perf-tools-next, thanks!

Best regards,
-- 
Namhyung Kim <namhyung@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-02 20:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-27  2:57 [PATCH] perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample() Yang Jihong
2024-01-27  4:45 ` Ian Rogers
2024-01-27 19:28 ` Arnaldo Carvalho de Melo
2024-02-02 20:57 ` Namhyung Kim

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).