Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3031101pxk; Tue, 15 Sep 2020 08:25:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYdMrkLK1qKnKlCITKqlNAETpssuNTx9wsEnJ+UudVcniRX834QlA4lSnZvvhOK4rez8cX X-Received: by 2002:a17:906:a1d8:: with SMTP id bx24mr20187336ejb.161.1600183508653; Tue, 15 Sep 2020 08:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600183508; cv=none; d=google.com; s=arc-20160816; b=Exr1XQjwGGMuttH2ZYqMm7+uhNB6E30WUUtGoJVho+43fscTvDCJifHmySt4AIxlpo vKUOkZEhkZ0kSDbjnuEzRIl04GBNDhSA/qjhrDtIUhopVcJCCzB8NBSLCNv7mFBUExAq Zw8nrINLJ92/RvNXTK15qY2eVzl/MRmQBBdzjpHyEl58oEjKGTzcP8JfG8NWKd0rlxM7 THm54Ls5hYGOtfXHHcl/eX6K/S9mFIo0078Peu8uEyVeucIp4TOIvLznM1NJQcI+ABtO M2rgzYD8QQhx+xa0841flBancKEjKLPfNpngMwDtTdJhp8IXAfYlfaWzthid791RSB3M 2WLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=ItQ0nM5B0+qFWtFQQEn6wTyRTgalEUArLdIK0Xz75h4=; b=E+mu6PYaF6URrur1tfOvOuuhmJ3abC3RNPAmrtXHx/exAScm1jSiaxc6JPcrPv1ms8 7m6zqeoX9juuLP9l5PScBdgySqwmZ0e+E/+MCfGtXiC+wTCSg+PKjDK9F2w4E8FgO3DL l+L4IQQoEWZrzlsLVnIFXaAcA1lAD4QQY1xTDovASBK69pKLsrE259AA3rGBMFomSij2 TaU+VBysAFgdv4tltwiNWXHLFOEn+bhwJby+kQ4fHX48twa1ilGoN4MgKrV20YWBYVno Yo/z7hg8GrCmZm2EAzic0r79GOUvlI3Z2liLkvHWkUbwTSBe6PqDxcilBSJcnMDBAQfo /F2Q== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 23si10358372edv.417.2020.09.15.08.24.46; Tue, 15 Sep 2020 08:25:08 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbgIOPXJ (ORCPT + 99 others); Tue, 15 Sep 2020 11:23:09 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45006 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727045AbgIOOtz (ORCPT ); Tue, 15 Sep 2020 10:49:55 -0400 Received: by mail-wr1-f65.google.com with SMTP id s12so3606380wrw.11 for ; Tue, 15 Sep 2020 07:49:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ItQ0nM5B0+qFWtFQQEn6wTyRTgalEUArLdIK0Xz75h4=; b=GGiGYCHETQqZ+yaJUhjnF2t+g4+/zGyvu1o/IiMLWvCmsKd6HecrMjXU81QRHltDNe LB0T8FHTljX1/02Zb1Qop3NzBllOS/tfWVrTpizXYxUCqlwowDPGo5X8rB/awNvImfwA eUqsEboGW1nvtpd43kJgcn6+xI9qnBjj9US9ZH3JJ2IHBeq2nHiOWzDGLyi/drPkCIbE WjhjGQ1gRs2fzuY4ri2XGVIxCIGANrpmyPK+3TA021O9bkJZ1GF86Pzkp8VScw+7I0d6 MOfUEZevFhQ8kZo316JVJDJCTnX89qVa4SS1t1TD4sOUONxUqOAH/5ih9cS2uYElyF4T DYcg== X-Gm-Message-State: AOAM530ElfMqLfarOm/Vs6/h23orlQer8LssAzCd5TFEV86q9PxHsbeY Qw65Iu7zQ6DGrjv6PEbd4R39dHR4rwOfzmJAW90= X-Received: by 2002:adf:8b48:: with SMTP id v8mr21914021wra.21.1600181393310; Tue, 15 Sep 2020 07:49:53 -0700 (PDT) MIME-Version: 1.0 References: <20200915031819.386559-1-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Tue, 15 Sep 2020 23:49:42 +0900 Message-ID: Subject: Re: [PATCHSET v2 00/11] perf tools: Fix various memory leaks To: Ian Rogers Cc: Jin Yao , Andi Kleen , Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , Stephane Eranian , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ian, On Tue, Sep 15, 2020 at 2:15 PM Ian Rogers wrote: > > On Mon, Sep 14, 2020 at 8:18 PM Namhyung Kim wrote: > > > > Hello, > > > > I've found and fixed a bunch of memory leaks during perf pmu and > > metric tests with address sanitizer. Before this, the tests were > > mostly failed due to the leaks since ASAN makes it return non-zero. > > > > Now I'm seeing no error with ASAN like below: > > > > $ ./perf test pmu metric > > 9: Parse perf pmu format : Ok > > 10: PMU events : > > 10.1: PMU event table sanity : Ok > > 10.2: PMU event map aliases : Ok > > 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) > > 10.4: Parsing of PMU event table metrics with fake PMUs : Ok > > 67: Parse and process metrics : Ok > > > > The failure in 10.3 seems due to parse errors like below: > > > > Multiple errors dropping message: unknown term 'filter_opc' for pmu 'uncore_cbox_0' > > (valid terms: event,edge,inv,umask,cmask,config,config1,config2,name,period,freq, > > branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack, > > nr,no-overwrite,overwrite,driver-config,percore,aux-output,aux-sample-size) > > > > > > Parse event failed metric 'DRAM_Parallel_Reads' id 'arb/event=0x80,umask=0x2,thresh=1/' > > expr 'arb@event\=0x80\,umask\=0x2@ / arb@event\=0x80\,umask\=0x2\,thresh\=1@' > > Error string 'unknown term 'thresh' for pmu 'uncore_arb'' help > > 'valid terms: event,edge,inv,umask,cmask,config,config1,config2,name,period,freq, > > branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack, > > nr,no-overwrite,overwrite,driver-config,percore,aux-output,aux-sample-size' > > The 10.3 failure seems to be a problem in the skl metric DRAM_Parallel_Reads: > https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json?h=perf/core#n319 > arb@event\\=0x80\\,umask\\=0x2@ / arb@event\\=0x80\\,umask\\=0x2\\,thresh\\=1@ > > The test failure message is: > Parse event failed metric 'DRAM_Parallel_Reads' id > 'arb/event=0x80,umask=0x2,thresh=1/' expr > 'arb@event\=0x80\,umask\=0x2@ / > arb@event\=0x80\,umask\=0x2\,thresh\=1@' > Error string 'unknown term 'thresh' for pmu 'uncore_arb'' help 'valid > terms: event,edge,inv,umask,cmask,config,config1,config2,name,period,freq,branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack,nr,no-overwrite,overwrite,driver-config,percore,aux-output,aux-sample-size' > > The 01.org version of this from: > https://download.01.org/perfmon/TMA_Metrics.xlsx > is: > UNC_ARB_TRK_OCCUPANCY.DATA_READ / UNC_ARB_TRK_OCCUPANCY.DATA_READ:c1 > > It seems that :c1 has been translated into thresh=1 but that thresh > doesn't exist as a format option (just "cmask edge event inv umask" > are present). I wonder if Andi or Jin you could look into this broken > metric? Thanks for the explanation. It'd be nice if Intel folks can take a look.. Thanks Namhyung