Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp544137pxv; Thu, 15 Jul 2021 09:54:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhF+N/lDGh7er9NI2Gx490D3j9LM7ER9wO+5r2r8zZ03HS9UFo67B1tkLO0v+xu6wkBTF9 X-Received: by 2002:a6b:1406:: with SMTP id 6mr3899468iou.25.1626368088434; Thu, 15 Jul 2021 09:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626368088; cv=none; d=google.com; s=arc-20160816; b=N2wgXKhny12V6PYz12lk33KX7Wq1DQyCEPJIUEL3Pmcyst8AG3A1vAWY2dMX207XeN a66PnqWJcY4TVWtwscNPvRGdfOqef+g+qSSg4ycFMK4G386/yUsEXMKVJIDWZTi3SynI aeOllyc1g1lxFdkv6wIkoG2bfl2FfxL+it5+pgOOh91a6WgDT9aA+IGvtvcQBZ8Hniwe L2qaNBg0p7Cs5NUn+Mqo+gF62OLQAmsJj4NozqysDZdv2gcXiSbCozTT3WPlyPvkMFJ3 ro+A0spb2ymryLfgXWlStel3l4vkxKScdtUARFeHANQUFYL6bexleE0nuEF/sujAOcwH uj+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uIlFdTueIqRJSW/8KrJBB/lB3UR/lkZ7OqoCtQMTjFM=; b=aEtKrH/BhWAJ3s+UpYBmFP1V1tm9Vmw1G/COsD0jjaNIvbAaCIR8ZEFaamIfYzBcAV x8E590q7s34Xsv1iiC7/IP6kPDtHgpSmSGG9g37g80WiZ8vk8923RWWwBUWlVdKHbaOy 1uDJyM6Qa8qIqJt1NDFYaDRYSEr7qdmqRSpfHCPfVDkh9p3VsDPM8OkEeG71Mt+OjfmH Evbt0VoDcpvRvXoVlpLBYRJMYlGSx0jKLiKgx3d5mn1tyxlY7WoFRperGPVbqLMct/2P JSoMUxfHeJBdN0Hm1ZKdBQKqlJ91TBRA7FkOLnS8n2Xa0A/NPgbByZPiK7lXUHRPeHQY 70mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o3DVlsFz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si8159013jap.105.2021.07.15.09.54.36; Thu, 15 Jul 2021 09:54:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o3DVlsFz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbhGOQKr (ORCPT + 99 others); Thu, 15 Jul 2021 12:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232740AbhGOQKf (ORCPT ); Thu, 15 Jul 2021 12:10:35 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A916C06175F; Thu, 15 Jul 2021 09:07:42 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id u5-20020a7bc0450000b02901480e40338bso5516392wmc.1; Thu, 15 Jul 2021 09:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uIlFdTueIqRJSW/8KrJBB/lB3UR/lkZ7OqoCtQMTjFM=; b=o3DVlsFzay8sgFC+YRJykVJhUKb615/2U9IbJnCM+pMMNz3Zdz6x2h0zVJSz8TnKsk 2lGJNfCIPVW3iRNQm/sic/yW9kwFRooT8KAED76tRMfwykheVFz4HPyMz913XTnG+bmU pQzLw3HcLI+O3M0mmFxrw1ViqNMxEVSZqDABj+ld1M4NCaXhShYc6Eo2Gka1gW1cYsH/ a3CB94Jy9gOY1JhooYLX+xCmxtZ2yN969nfJnTaqVPh/cKQXV/8EhP+acE8EHRNjXqOd eUd010XAGNS74V0Xpjxp4CBpQ9eYPn+L5KMary2jkh1CaP0PYtOSFmTGhTWB9aGBjuiK mglQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uIlFdTueIqRJSW/8KrJBB/lB3UR/lkZ7OqoCtQMTjFM=; b=feY4p3P/OYMrGeY5KlCDGxtnaMWlHpwgFlTatbn2Su7kXYzfAhhHPd8BL+5PZNyry+ hkjnhM2AFaxUtXZ5FIVxEAsp2nrBVfcqzapjv0fm1uICo21C8FFOWNGK6mTgpT182OWk Y2kWM2g7Y5MgdJdFnCQSsSz+ilz3aJiALpClNtvYW/mRAC4ONVhXKp3Kb48bY+BlORpv FucUNQCH8D4mMeVGsPK1ihoEEc/B0FYMyY6J6Z7RVHBLdk6NKyxsMJKnqleH/wPY1wGJ oL4rMfJXU0tz46rAOzhM9SbEcqTj9EsyOYX1qA/Ve5O8Zcaa/E63XOxSPFHgEUVLVBTL jevg== X-Gm-Message-State: AOAM5314v/VxrCSXYfhaY7ZD5ANeMrzVcRdNMmNpoeiaVH2c6SN2hlwN OJd9UeptfKTk2lCQinMJoz4= X-Received: by 2002:a1c:416:: with SMTP id 22mr11572591wme.59.1626365260490; Thu, 15 Jul 2021 09:07:40 -0700 (PDT) Received: from honeypot.lan ([2001:b07:6456:fd99:ced0:db1c:53e1:191e]) by smtp.googlemail.com with ESMTPSA id k13sm7446952wrp.34.2021.07.15.09.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 09:07:39 -0700 (PDT) From: Riccardo Mancini To: Arnaldo Carvalho de Melo Cc: Ian Rogers , Namhyung Kim , Peter Zijlstra , Ingo Molnar , Mark Rutland , Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Riccardo Mancini Subject: [PATCH 11/20] perf session: cleanup trace_event Date: Thu, 15 Jul 2021 18:07:16 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ASan reports several memory leaks when running the perf test "82: Use vfs_getname probe to get syscall args filenames", many of which are related to session->tevent. This patch will solve this problem, then next patch will fix the remaining memory leaks in perf-script. This bug is due to a missing deallocation of the trace_event data strutures. This patch adds the missing trace_event__cleanup in perf_session__delete. Signed-off-by: Riccardo Mancini --- tools/perf/util/session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index e9c929a39973ace9..51f72740291267c5 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -306,6 +306,7 @@ void perf_session__delete(struct perf_session *session) evlist__delete(session->evlist); perf_data__close(session->data); } + trace_event__cleanup(&session->tevent); free(session); } -- 2.31.1