Message ID | 20230320033810.980165-5-irogers@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1010996wrt; Sun, 19 Mar 2023 21:28:00 -0700 (PDT) X-Google-Smtp-Source: AK7set+NtIJegr3o2ayGvnXSPWOi9ARgUa0EHS1wICYT/xi9Ce/EeGl7W1IfruF1DGS2Znclxmq/ X-Received: by 2002:a05:6a00:e0e:b0:626:62f:38d8 with SMTP id bq14-20020a056a000e0e00b00626062f38d8mr12688609pfb.3.1679286479667; Sun, 19 Mar 2023 21:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679286479; cv=none; d=google.com; s=arc-20160816; b=xpJhVDgVoAyV+VlHWRSAEoSF+bH/9uf8zJUCjXZr4cgUzknp3MA4x3ooOMY/Gcazis +v2YCxiPqOAnjcWuA0sDzSEO2AjNPtkXQuVXMMfg/m2NF0VFSO+CnYf1b+4tp4MPz46Q DaVageCeU2Gd6N8GtWYdZ9tRN9B57QkJhJa9VV3184o+9vqRMR+NSERCtJ5kyjvvJqh/ itzNqKoHQMjEdAFktxAfW4o+Rf3cPaiMqlj6fQVwE23XQRkQvJdFuodAA3y6iGFMM30G Lrq+Hq7o9HeNM6yejTMntrBIFdYIno5rZEZwrxCEHqiT+nG5p95HYyJE86TUqjiTirmI bjUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=jWDjPPDoVS0JDf2qDq/S5D6izq+O5FLiZzLIDYhTDcw=; b=t/1omNjPg8ox7CIgOjosJRT60cpnCeLAPjSqvfrf7wo/xcMKU0mTEWYA1fdwPrQU85 LYy+zjLCa8Cq0rZZbebv5LT6TashVlfebTvBWzOoYykBuA2/mm/8ClmqBL0veEj/1qZh /iQCbN6ZR8qcquOIumQA/tUbPbTcvZdXk2FhX4zkxqI7UDT1tI8NVxUk3xPiYdxb7edY NJLvsUiTDiUHvS4LB5I7ZmBBwMInxuJd/Fn+X00SfOvv+8iR7DGSZOcvd+MOu9d+xMK7 eRlPItOX24GzpiB5KnRUHraF6oR0fDJofvDPCq25XVEvejNauTIsQSMGZw17x3eBJqzQ whKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nLz4ieuq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a056a00239300b005cd33628c0fsi10326496pfc.177.2023.03.19.21.27.47; Sun, 19 Mar 2023 21:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nLz4ieuq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbjCTDjp (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Sun, 19 Mar 2023 23:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbjCTDjZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 19 Mar 2023 23:39:25 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64DE82279D for <linux-kernel@vger.kernel.org>; Sun, 19 Mar 2023 20:39:09 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5446a91c40cso109976187b3.18 for <linux-kernel@vger.kernel.org>; Sun, 19 Mar 2023 20:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679283548; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=jWDjPPDoVS0JDf2qDq/S5D6izq+O5FLiZzLIDYhTDcw=; b=nLz4ieuq6UQ5762iyzEeXxWSNK23K6yAuzQg63tWTPUIEyVjby55CsOVPeUtvgl1yI HcneNx08ADteLp+/O4bi+8YI0ur6CZ7cZBuHbFdrn/k2l5ddq7nfLQILexB0idnupNXt w//iLOiyCoxAN57trk5THriviyko0qKJ5C0TCMc24ZSufaekqPSTiY2CwqtDNhcW91BN 07P8aJ15SRl2/dwVRVr0S6lrQYbmxbFi/IwX/Ecr9HTBRoRLBSVu7S4R3Dm6qFRT66IW +ums7G4p3gNHeT9ZvVnnPnnTzYl3upmQoDXnwHM6tvEhQjSqj9mSuYE4OFEdrsf+z/+E djGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679283548; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jWDjPPDoVS0JDf2qDq/S5D6izq+O5FLiZzLIDYhTDcw=; b=qPipz7zCFtV4AbsYf/Fj594NMUCuO0FxCgfBg6eHo2YmQ65zrb8ChffPFc0kIgBH5F FZnRd9yUs1MwrvRLBXovUUTsaMVjLTjqTBTF2g5Pl8XEiCzFj74v5A9WleKNP33bxds9 CIovNqOXVperDVwMi7HHnTHGdP5wQfIzvXcPw/HBrj0rgDhjDHcxKvDmsUKZwIQYf0pf vZ2/ISTQ4xHPgkQJFQPv8aAQoI7Lyq9AEdmSc2/uN/1wtzAAIm2lF5JHfHjTP6lMe9TK 4xSF5rryLUFCoWR4F7oH5/zSicf7fnf5hc8aO0zXO1G3Sk3rVrC1uQ9HmAaCOLXeYs+K zX4w== X-Gm-Message-State: AO0yUKWZCE8uaFlkn68qA8sTFjUosxAfgd7aZrnN9maLlZazR/t4u+Yg bSwbbX2SK0pYZ6ibl5iyreFDkiykMHeE X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:1895:9fa0:27f5:cb71]) (user=irogers job=sendgmr) by 2002:a81:af02:0:b0:541:822f:af40 with SMTP id n2-20020a81af02000000b00541822faf40mr9649912ywh.10.1679283548003; Sun, 19 Mar 2023 20:39:08 -0700 (PDT) Date: Sun, 19 Mar 2023 20:37:52 -0700 In-Reply-To: <20230320033810.980165-1-irogers@google.com> Message-Id: <20230320033810.980165-5-irogers@google.com> Mime-Version: 1.0 References: <20230320033810.980165-1-irogers@google.com> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog Subject: [PATCH v4 04/22] perf test: Fix memory leak in symbols From: Ian Rogers <irogers@google.com> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Darren Hart <dvhart@infradead.org>, Davidlohr Bueso <dave@stgolabs.net>, " =?utf-8?q?Andr=C3=A9_Almeida?= " <andrealmeid@collabora.com>, James Clark <james.clark@arm.com>, John Garry <john.g.garry@oracle.com>, Riccardo Mancini <rickyman7@gmail.com>, Yury Norov <yury.norov@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Andrew Morton <akpm@linux-foundation.org>, Adrian Hunter <adrian.hunter@intel.com>, Leo Yan <leo.yan@linaro.org>, Andi Kleen <ak@linux.intel.com>, Thomas Richter <tmricht@linux.ibm.com>, Kan Liang <kan.liang@linux.intel.com>, Madhavan Srinivasan <maddy@linux.ibm.com>, Shunsuke Nakamura <nakamura.shun@fujitsu.com>, Song Liu <song@kernel.org>, Masami Hiramatsu <mhiramat@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Miaoqian Lin <linmq006@gmail.com>, Stephen Brennan <stephen.s.brennan@oracle.com>, Kajol Jain <kjain@linux.ibm.com>, Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>, German Gomez <german.gomez@arm.com>, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>, Dmitry Vyukov <dvyukov@google.com>, Hao Luo <haoluo@google.com> Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760859499776598417?= X-GMAIL-MSGID: =?utf-8?q?1760859499776598417?= |
Series |
Reference count checker and related fixes
|
|
Commit Message
Ian Rogers
March 20, 2023, 3:37 a.m. UTC
machine__delete doesn't delete threads. Add call to delete threads
ahead of deleting the machine.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/tests/symbols.c | 1 +
1 file changed, 1 insertion(+)
Comments
On 20/03/23 05:37, Ian Rogers wrote: > machine__delete doesn't delete threads. Which begs the question: Shouldn't it? > Add call to delete threads > ahead of deleting the machine. > > Signed-off-by: Ian Rogers <irogers@google.com> > --- > tools/perf/tests/symbols.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/tests/symbols.c b/tools/perf/tests/symbols.c > index 057b16df6416..0793f8f419e2 100644 > --- a/tools/perf/tests/symbols.c > +++ b/tools/perf/tests/symbols.c > @@ -38,6 +38,7 @@ static int init_test_info(struct test_info *ti) > static void exit_test_info(struct test_info *ti) > { > thread__put(ti->thread); > + machine__delete_threads(ti->machine); > machine__delete(ti->machine); > } >
On Mon, Mar 20, 2023 at 1:06 AM Adrian Hunter <adrian.hunter@intel.com> wrote: > > On 20/03/23 05:37, Ian Rogers wrote: > > machine__delete doesn't delete threads. > > Which begs the question: Shouldn't it? Agreed. The patch set was already large enough so I think this can be followed up separately. Thanks, Ian > > Add call to delete threads > > ahead of deleting the machine. > > > > Signed-off-by: Ian Rogers <irogers@google.com> > > --- > > tools/perf/tests/symbols.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tools/perf/tests/symbols.c b/tools/perf/tests/symbols.c > > index 057b16df6416..0793f8f419e2 100644 > > --- a/tools/perf/tests/symbols.c > > +++ b/tools/perf/tests/symbols.c > > @@ -38,6 +38,7 @@ static int init_test_info(struct test_info *ti) > > static void exit_test_info(struct test_info *ti) > > { > > thread__put(ti->thread); > > + machine__delete_threads(ti->machine); > > machine__delete(ti->machine); > > } > > >
diff --git a/tools/perf/tests/symbols.c b/tools/perf/tests/symbols.c index 057b16df6416..0793f8f419e2 100644 --- a/tools/perf/tests/symbols.c +++ b/tools/perf/tests/symbols.c @@ -38,6 +38,7 @@ static int init_test_info(struct test_info *ti) static void exit_test_info(struct test_info *ti) { thread__put(ti->thread); + machine__delete_threads(ti->machine); machine__delete(ti->machine); }