[PATCH v1 08/17] perf jitdump: Fix missed dso__put

Ian Rogers posted 17 patches 1 week, 2 days ago
[PATCH v1 08/17] perf jitdump: Fix missed dso__put
Posted by Ian Rogers 1 week, 2 days ago
Reference count checking caught a missing dso__put following a
machine__findnew_dso_id.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/jitdump.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index b062b1f234b6..27a2ea1b000b 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -546,6 +546,8 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
 
 		if (dso)
 			dso__set_hit(dso);
+
+		dso__put(dso);
 	}
 out:
 	perf_sample__exit(&sample);
-- 
2.52.0.rc2.455.g230fcf2819-goog
Re: [PATCH v1 08/17] perf jitdump: Fix missed dso__put
Posted by Arnaldo Carvalho de Melo 8 hours ago
On Sat, Nov 22, 2025 at 12:19:20AM -0800, Ian Rogers wrote:
> Reference count checking caught a missing dso__put following a
> machine__findnew_dso_id.

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

- Arnaldo
 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/util/jitdump.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
> index b062b1f234b6..27a2ea1b000b 100644
> --- a/tools/perf/util/jitdump.c
> +++ b/tools/perf/util/jitdump.c
> @@ -546,6 +546,8 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
>  
>  		if (dso)
>  			dso__set_hit(dso);
> +
> +		dso__put(dso);
>  	}
>  out:
>  	perf_sample__exit(&sample);
> -- 
> 2.52.0.rc2.455.g230fcf2819-goog
>