Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3027917pxb; Tue, 12 Jan 2021 04:43:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGJR1ovJdRbSmRTHj7p+SU1vziPBlPvN3ZBYJdk7kjsewbvTekGtIx/QpchjW32f0UpasV X-Received: by 2002:aa7:c84c:: with SMTP id g12mr3224633edt.193.1610455397391; Tue, 12 Jan 2021 04:43:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610455397; cv=none; d=google.com; s=arc-20160816; b=PUj5/XC8K2FHv22h0ZQQcbpHYCHlOwd36SU8hqUUrgJNF0G/QlxVIE33XaP7lwxdca MXZjVX0SSY59NO34MDiQBXOM8r6cpLW/fCNEoDCdnCd7VetW2DRfOCePvbwOLDl9ukOD U9hzF912QAZ7wj/pdBQnyTbW5Djcu83giegKT34JEE/aqTXWSDOjYmUxWtBTzoXuYK/a 04T+8uHI54jnb6K1cP6r0NKxycH0qIKGlEHlWkUc5IZa6nWeCEvLfC3Ury1suOV5MRyV pxVig+vcGRXTKMQaaPRsWcr+xMLcmQQ9PJex+rvoEq34/6C6mlQ8aRm2ULHlB8ctxYjS WK1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5NbcmgwaYrjavDDzcTR+11B6XNHE1NWBigHknZI2YPE=; b=hjCHCGZsn3KBVqdQVK6GdySNGx0TpNv/jVgk6fGC2zolbuS1zxaSycRdW+O2VFXnbz EpvtGwpdVIopsZh/om/WXHiraZhxtxoBPZ0RLyE6qyQRnafdPZHjkhuSc8MLXC7K4stS jteJFHuHVgUXiN/Hv2XZlYqPi5Tw8whmQCY9pwTST7kVqxMk+u1QuV78CRyiIENmMcp/ 4lyiI2GpTcBMutd3lkeVuePnfqwx0m6VUW4kVyrfHGESqd0qpYy58nc2u6s6xpssqQdd +7JFe4WnQtJU55HVluJYIYBdzoh9AAGMJFoSMkaQBwlNCamLuttlj5pKM1pWgxh3+unb 4B/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QYdIfN51; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si1008934ejj.142.2021.01.12.04.42.53; Tue, 12 Jan 2021 04:43:17 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=QYdIfN51; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404335AbhALKJo (ORCPT + 99 others); Tue, 12 Jan 2021 05:09:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:52640 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392755AbhALKJo (ORCPT ); Tue, 12 Jan 2021 05:09:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610446097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5NbcmgwaYrjavDDzcTR+11B6XNHE1NWBigHknZI2YPE=; b=QYdIfN51MKIDcFZRoMXCpP/wY1jhfycldLdPPkXMOBr4eGFf5G5rd3vdpyFQpZ55WzQWeh 2ejY1QjVynXdKFPovMu087XLtR9gMDtcErzHnIo1uiPp4YzAWDurydwr4h9IUqDotQVlEM MuMXSeatHU0SytY+swZtT1bsjr9Zhzo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-264-Y4uS8_oHNOyKY4TR6rJ7cA-1; Tue, 12 Jan 2021 05:08:12 -0500 X-MC-Unique: Y4uS8_oHNOyKY4TR6rJ7cA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B64F5100C660; Tue, 12 Jan 2021 10:08:10 +0000 (UTC) Received: from krava (unknown [10.40.195.50]) by smtp.corp.redhat.com (Postfix) with SMTP id 4229D60BE2; Tue, 12 Jan 2021 10:08:08 +0000 (UTC) Date: Tue, 12 Jan 2021 11:08:07 +0100 From: Jiri Olsa To: Jin Yao Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH v2] perf stat: Append to default list if use -e +event Message-ID: <20210112100807.GB1273297@krava> References: <20210104021837.30473-1-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210104021837.30473-1-yao.jin@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 04, 2021 at 10:18:37AM +0800, Jin Yao wrote: > The default event list includes the most common events which are widely > used by users. But with -e option, the current perf only counts the events > assigned by -e option. Users may want to collect some extra events with > the default list. For this case, users have to manually add all the events > from the default list. It's inconvenient. Also, users may don't know how to > get the default list. > > Now it supports a simple syntax: -e +event > > The prefix '+' tells perf to append this event (or event list) to default > event list. > > Before: > > root@kbl-ppc:~# ./perf stat -e power/energy-pkg/ -a -- sleep 1 > > Performance counter stats for 'system wide': > > 2.04 Joules power/energy-pkg/ > > 1.000863884 seconds time elapsed > > After: > > root@kbl-ppc:~# ./perf stat -e +power/energy-pkg/ -a -- sleep 1 > > Performance counter stats for 'system wide': > > 2.11 Joules +power/energy-pkg/ # 0.000 K/sec I dont think we should print the extra '+' prefix jirka > 8,007.17 msec cpu-clock # 7.993 CPUs utilized > 125 context-switches # 0.016 K/sec > 8 cpu-migrations # 0.001 K/sec > 2 page-faults # 0.000 K/sec > 8,520,084 cycles # 0.001 GHz > 2,808,302 instructions # 0.33 insn per cycle > 555,427 branches # 0.069 M/sec > 59,005 branch-misses # 10.62% of all branches > > 1.001832003 seconds time elapsed > > Signed-off-by: Jin Yao