Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp190593pxx; Mon, 26 Oct 2020 06:31:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLwPzM9GQiSYhYQOrAmuOcg5Pn7nIxMGUliKR6RaR0GooWfFZviIH7AMzUjyLK7IHjIr7X X-Received: by 2002:a50:8acf:: with SMTP id k15mr15795681edk.351.1603719098961; Mon, 26 Oct 2020 06:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603719098; cv=none; d=google.com; s=arc-20160816; b=Xj4BUdJjGOv4F0c0rCtHqBOy9nmHZNPW9VDZNjbVkkYsBEIbhJ4+Z650uIAUywpeBJ lAoaZRp9nxHgm01HZxmJBg5pDpeEj8bdW6IgwoKlMlSehe2dJLWcBejampDZTYr23hOL yZv0OtxG0EDW1E7s1T6coN+qi/YyV4FxKRydZt1kJ8FpRIl3r0bGZeeTgi6UNb5lfzYR CX2/6YdYGTsQ+SoOsst1tqbz2L5wPMnZm4PP8vmt/HS4z0QoQc9w5k/NGcOzmNH5kjKg sJ4O8xk1PmF1FmDt9/VHZaGp7zLf4LBkSFgkEiH4fuOjev3pHrOtZ2+TfMJp2dTxWET2 9VTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=5mPG9kxgffFTRkjAQY/IMTqi1t20ao+eTWiXrIBwNB4=; b=xNwHVA5pdrW/Kpk1gIcZd5STl5GGbQoJcvCst5b69z/TuSJdT6E+jeldzGNS6z/dIq lfQMcq3ceWywWb+TDzjSMAmz1aC/czpFrUW8YhFSH/aZcdrGHyYq9jJnQk0uTdrFplrp FVOGqd9z44LfCEcGw8ZWu/kSvlR9vyxd9218/7hPCWkFOP2y/zgi40T0+xK1QJYlTzC9 a/0W2V4KwuF4VvRlqvozESGxC3slpknsli0SVOLzHFE3qiJbP+MN1aHJojRz/Avknb3i ND6qf36zBoUZZH/3jlQjx6oOvOJRJJREvjOwILMFsYOuZUy9CFO1DqPXPXGBl/gbnvKe H13A== 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 da5si8430629edb.595.2020.10.26.06.31.15; Mon, 26 Oct 2020 06:31:38 -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 S1775163AbgJZMcs (ORCPT + 99 others); Mon, 26 Oct 2020 08:32:48 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38982 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1767813AbgJZMcs (ORCPT ); Mon, 26 Oct 2020 08:32:48 -0400 Received: by mail-wm1-f65.google.com with SMTP id d3so12283480wma.4 for ; Mon, 26 Oct 2020 05:32:45 -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=5mPG9kxgffFTRkjAQY/IMTqi1t20ao+eTWiXrIBwNB4=; b=nrBGahKS9gt90seRsUR97NGtN06DHavBktktTrnlIK7JASV07MLq8MvjJqt7rz6vBt crnE4CP08rgie4z2UEXFwincdONfCcuCZCcX0EwaGcEfRKuUwxBhY+6OGkzNK8JQSSU2 C5/oOu2/JQilE8eoYz7im0XLslHF7TpTXXMe0BNUPxj+S8gnpyWqCP0LTMw7dyMMAlNM qFW6zPkd1fl6ZrqCEBMNywQn0GLQIxt9VDTPCmzEJBaNmvFkO0eRaXmpSigufSOrPUc1 cABgEfyllin6O6I2D/kl0RSw405Iu96UpDJjwfv00z3i6HGNtAgTRAGRY950Hf865Bgo A/DQ== X-Gm-Message-State: AOAM5325ysl2c8DplAkGqLz+yxVrHuwyBr2/aigPWVO8rScZ+SM9x5Ag wfW6PN8bZE6xP/ec9BHygp6YRixWS3avBtHcPT4= X-Received: by 2002:a7b:cb46:: with SMTP id v6mr15830898wmj.146.1603715565242; Mon, 26 Oct 2020 05:32:45 -0700 (PDT) MIME-Version: 1.0 References: <20201024025918.453431-1-namhyung@kernel.org> <20201024025918.453431-2-namhyung@kernel.org> <20201026114009.GD2726983@krava> In-Reply-To: <20201026114009.GD2726983@krava> From: Namhyung Kim Date: Mon, 26 Oct 2020 21:32:34 +0900 Message-ID: Subject: Re: [PATCH v2 2/2] perf stat: Support regex pattern in --for-each-cgroup To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Andi Kleen , Ian Rogers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On Mon, Oct 26, 2020 at 8:40 PM Jiri Olsa wrote: > > On Sat, Oct 24, 2020 at 11:59:18AM +0900, Namhyung Kim wrote: > > To make the command line even more compact with cgroups, support regex > > pattern matching in cgroup names. > > > > $ perf stat -a -e cpu-clock,cycles --for-each-cgroup ^foo sleep 1 > > > > 3,000.73 msec cpu-clock foo # 2.998 CPUs utilized > > 12,530,992,699 cycles foo # 7.517 GHz (100.00%) > > 1,000.61 msec cpu-clock foo/bar # 1.000 CPUs utilized > > 4,178,529,579 cycles foo/bar # 2.506 GHz (100.00%) > > 1,000.03 msec cpu-clock foo/baz # 0.999 CPUs utilized > > 4,176,104,315 cycles foo/baz # 2.505 GHz (100.00%) > > just curious.. there was another foo/XXX group using the > rest of the cycles, right? No, if so it should be displayed too. But actually there was a process in the foo cgroup itself. > > also perhaps we want to warn if there's no match found: > > $ sudo ./perf stat -a -e cpu-clock,cycles --for-each-cgroup ^foo sleep 1 > > Performance counter stats for 'system wide': > > > 1.002375575 seconds time elapsed > Right, will check this case. Thanks Namhyung