Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp129377pxb; Thu, 14 Jan 2021 01:34:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4iQxOk5gNS75K155Obe8PKM77PKD8e2fh4SoOUGUzwkZy/V0xSG2O3/kTvzGZDXszNVBw X-Received: by 2002:a05:6402:11c7:: with SMTP id j7mr4991498edw.290.1610616858021; Thu, 14 Jan 2021 01:34:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610616858; cv=none; d=google.com; s=arc-20160816; b=FWxJP/v884sfFnmE5BGy2VI5X70/JCVkUq27eFjopgw3ZALQT1PhJy20Br3bazwMqe dfuRtyUkupQ97yG2jhJc0llITo5kfVpwNlnplJOLYFD7ak1BAcgAdgRV6m5hSRZQwpQW 8Y6gZ837jgTAIpjdqzs0Hj7oKqWt9PYN5RDDTzQAOWvaLGVugBIHQa3AKu6iqV8vxoMS jNzEFZuhp/nR1J2oPqxN5LDgrbpiJ1PUYcIrTEggaKeiSmuz4flzmGrNucDvN7xFspnn lQZWnlXEPff7KT7eYJHvw+n0/KaQhPbHejwrAqTHiavJQT+kuiOEve68TL3MOYli8F/R X3wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=MBnyA8R80dGUCQHK2/wf5eusEOlmX9RQESetUWOUsMk=; b=Vr4tuaVjfoP26RPDYcKoazNa55/ABH7sF1onNfXyBUIO6JuqIba7mBtTBN8L3H5XEe EfldbUHzYPLztS8vqdqulBvKg6DzOyQeRRgnOPTHFioBHXrSeoTud1ZNvb8+QdiP6roQ RdNRxGQr/UyokJ4e1+yCFK16FmRuwPVBSo2FTMLFEKlYmlleOGWVDN/8+kLAzPYH1NQa ci9xbpAYkk4ig6udOS8u6J3XDmBZRy4NkgUfkhOXrUt1zl5EKLUwNifCg2lSlajpI4XM pZUzsukDGKMzdDJ6HR3Twuj68ZT8ZY7cJSmOlNvgmzd33V+P3SRmtakTTflRGPIwMHs6 jAGg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si2106163ejy.363.2021.01.14.01.33.54; Thu, 14 Jan 2021 01:34:18 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728130AbhANJdA (ORCPT + 99 others); Thu, 14 Jan 2021 04:33:00 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2341 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727784AbhANJc7 (ORCPT ); Thu, 14 Jan 2021 04:32:59 -0500 Received: from fraeml742-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DGf8p2d9yz67bTC; Thu, 14 Jan 2021 17:27:06 +0800 (CST) Received: from lhreml741-chm.china.huawei.com (10.201.108.191) by fraeml742-chm.china.huawei.com (10.206.15.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 14 Jan 2021 10:32:17 +0100 Received: from [10.199.170.166] (10.199.170.166) by lhreml741-chm.china.huawei.com (10.201.108.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 14 Jan 2021 09:32:11 +0000 Subject: Re: [PATCH v2 1/2] perf tools: add 'perf irq' to measure the hardware interrupts To: Bixuan Cui , , , , , , , , CC: References: <20210114074852.13231-1-cuibixuan@huawei.com> <20210114074852.13231-2-cuibixuan@huawei.com> From: Alexei Budankov Message-ID: <4ad7a048-8982-577b-b7c0-ca7e25f901d6@huawei.com> Date: Thu, 14 Jan 2021 12:32:05 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210114074852.13231-2-cuibixuan@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.199.170.166] X-ClientProxiedBy: braeml707-chm.china.huawei.com (10.226.71.37) To lhreml741-chm.china.huawei.com (10.201.108.191) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14.01.2021 10:48, Bixuan Cui wrote: > Add 'perf irq' to trace/measure the hardware interrupts. > > Now three functions are provided: > 1. 'perf irq record ' to record the irq handler events. > 2. 'perf irq script' to see a detailed trace of the workload that > was recorded. > 3. 'perf irq report' to calculate the time consumed by each > hardware interrupt processing function. > > Signed-off-by: Bixuan Cui > --- > tools/perf/Build | 1 + > tools/perf/builtin-irq.c | 287 +++++++++++++++++++++++++++++++++++++++ > tools/perf/builtin.h | 1 + > tools/perf/perf.c | 1 + > 4 files changed, 290 insertions(+) > create mode 100644 tools/perf/builtin-irq.c > +static int __cmd_record(int argc, const char **argv) > +{ > + unsigned int rec_argc, i, j; > + const char **rec_argv; > + const char * const record_args[] = { > + "record", > + "-a", Could you please make it configurable from the command line jointly with -p option? > + "-R", > + "-c", "1", > + "-e", "irq:irq_handler_entry", > + "-e", "irq:irq_handler_exit", > + }; Thanks, Alexei