Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1360136pxx; Tue, 27 Oct 2020 15:05:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7EVCi2aYWQKGC+q/S1lPx9HqkNK3l1DAwzpsSE/WOOLK1IsVOfsERG6u8jrrm8AuQdaCL X-Received: by 2002:a17:906:1446:: with SMTP id q6mr4680248ejc.549.1603836308944; Tue, 27 Oct 2020 15:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603836308; cv=none; d=google.com; s=arc-20160816; b=ZI/wWvxV47DF6xCXnnXR9aEhvpTiyPZmjua5CVxopEVReYrcOUxRRNtl/Z3VkwwnKs 88VS9hi08R8zLv79evZYN8/IvgaoyexwawLp7omQdTcb9Spr6K0FyJkW9mzRt2/Zgu5G d2qYcIpGaCtGFVqJpRWaA5S5wVJo+RQvZzWg2i7+22b3BtBtxjBIhe4C/yQR1WQITxvU ze+Wf8ejWx3jBW7+zYwWJtqpOIidf8iUROFzIXakOYh/uUQZTIfk9Zm0iguH8N0cdhLe j2N2fx9DwndCgEetyGhtK6hTtgbk0SUdzYLAZ6iGMq5ADq/OBrI/OI3LxaGkzSqEp0Bi IyOA== 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=hXPt7C+f3W4WvPcu+w1HOqYJwVh5MZK/Q2VH9P6oCkY=; b=dUx3wII1aOwfn4LDuaP0ybPljkeAZUu/xX7tqoNYeJc4Sha30+k1nieylr0zOgdS65 Ir8jSlbAjvjNsoCihdUigujBcowLgW8/kPXPyQAyWG1ZFOBv9+xtPxntBe1CTykFXUUG 80pEdk9vAtmEFKuH7Uc1uh0/JNvCfbC/yqhCeqQME14zcju/fco6NwwMOlNraqxZI3Ns OyLojq5XSBVzeavMOk8qlPfG3t3AzFHAIqevz5q+6DhsqPjU0bQml60SzAGSLEGp0smd +cXzItROhvfALUha628Qb2jo/yisno1F3AlC03KfTTYlPavUgmtLKo9S4EAp+r+ssfpG ZBXw== 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 dp16si2084348ejc.178.2020.10.27.15.04.47; Tue, 27 Oct 2020 15:05: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 S2505585AbgJ0FAp (ORCPT + 99 others); Tue, 27 Oct 2020 01:00:45 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35433 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436452AbgJ0FAp (ORCPT ); Tue, 27 Oct 2020 01:00:45 -0400 Received: by mail-wr1-f68.google.com with SMTP id n15so402713wrq.2 for ; Mon, 26 Oct 2020 22:00:44 -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=hXPt7C+f3W4WvPcu+w1HOqYJwVh5MZK/Q2VH9P6oCkY=; b=nMz7dR9SEyveVBMENt2z1vTZNdb2zzWQfzOeZdLs06vnxhGlQN4HANPQHsG9mJYTzJ rYAvhSZlIUq1nnzfpYVPArG1MiN0QsLk8g3WiE4QxK3iiYcZvFI+ga468ePb39+FGG6M yRErDg8Bfm6wHcgheGMG5Hs6R2ljCo3VDLU6zaS/iJ/AKzEMb470a6kEqaKwGzmmzZwE 9VuYYZwf1ZUCTU6+dahE77MpIL4D6UgXInGG9t0/y7NnALspkADM87luGytX1TtXhct+ KNouwltEniMlPuIDidJZQOgdJnLmEqGmnLZ+AE132UxoTMPDL8RMwPb8lJVl+5jyBhyb JDPg== X-Gm-Message-State: AOAM532UvhEM3iu/zyEybNc/Cx+w9HSJZzpu78+hGIs6bw522F71a34e LdwqslzEKfS4kGIUuhVARGkMRjK3QnerDDKk/5c= X-Received: by 2002:adf:a345:: with SMTP id d5mr521340wrb.55.1603774844067; Mon, 26 Oct 2020 22:00:44 -0700 (PDT) MIME-Version: 1.0 References: <20201024025918.453431-1-namhyung@kernel.org> <20201024025918.453431-2-namhyung@kernel.org> <20201026114009.GD2726983@krava> <20201026175349.GA2449445@kernel.org> In-Reply-To: <20201026175349.GA2449445@kernel.org> From: Namhyung Kim Date: Tue, 27 Oct 2020 14:00:33 +0900 Message-ID: Subject: Re: [PATCH v2 2/2] perf stat: Support regex pattern in --for-each-cgroup To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , 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 Arnaldo, On Tue, Oct 27, 2020 at 2:53 AM Arnaldo Carvalho de Melo wrote: > > Em Mon, Oct 26, 2020 at 09:32:34PM +0900, Namhyung Kim escreveu: > > Hi Jiri, > > > > On Mon, Oct 26, 2020 at 8:40 PM Jiri Olsa wrote: > > > 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. > > Hum, I thought that could be done on top of this one, but then, the > ambiguity of: > > 1. No samples for a cgroups matching that expression > > 2. No cgroups match that expression > > Is real and warrants a warning for the 'no cgroups match the > --for-each-group regexp' case. The 1 will be handled by perf stat showing and I'll add a warning for the item 2 like below: # perf stat -a -e cycles --for-each-cgroup ^foo sleep 1 no cgroup matched: ^foo Usage: perf stat [] [] --for-each-cgroup expand events for each cgroup Thanks Namhyung