Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp667006pxx; Mon, 26 Oct 2020 18:43:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoxU96izkOUqWlj5yTA+WgJVJxlL6JUSr/oI4b3bgNvm+WjozRkk05yXjgsmaRaimbtnE7 X-Received: by 2002:a05:6402:134c:: with SMTP id y12mr18468370edw.344.1603762986859; Mon, 26 Oct 2020 18:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603762986; cv=none; d=google.com; s=arc-20160816; b=Vn1i2kaSwv/buDkgZnp71MtHSquEohBgInNQFqSYMLSKk7h2XgiGBibWu/KZeHd/1N RqaR++SkiTOUFjqi2gUalDY4bhv8dglnIaj6aK/FrvOYX8KUj0DiCSMRtHCeXjRYFrvW Yq3ZzxNC9pRRxUKDI75gwSepz14jVrLl1iTdKbhvaW33PpavAiYiu5qZP51j3a8+vwwc N1tyEflj+yJ8XWusqX9BT5ahKm4daquX3wvC2joE0/9kJOMZOcYkITO7Eh/hKqfsZ7Uk /VrSXzRUPa8GgcrnckRKnkha8R6etsGmOZqjVRLzfDYMfPy66UWGzZ7TZTkoKZ+qCckZ gFYg== 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=1VlBkk48cfBNf2HAKzn6SLfThjCgNbicJjEUDxG4Xlc=; b=EY05m0Lf3Os2nTQRjcswK1WtV9Hbs3zSwQZIkHvVXJmwyw9JzDVso8pW56tBuwQvkm T1ZkU73zLznzWwQC55c51D6Pvz8RB+6HbpLZIffJWZMOe5b6rGsNV7f4zVwilOoDW2WN G+Mn7hC9y7mUd0ybkAa+CBwMetpSsOPu6yDOUjQavjKepOSCJAfGXjA/b/bLLuOwg+of Mr3higTHUY7fL7Zwnu8LoyrBl/kOOtzqJj6T45ZyaL3vFlTIRHqeCgvoifjkaXT86cUw Hj/gHoHEvFx4vaTWPYrP/+e0wAzYp9OdMRgn79HnVZr6A+FIK0MC2X5J69RCvWj9dGv6 MuiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jCtZnhDs; 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 c1si8515468ejf.66.2020.10.26.18.42.43; Mon, 26 Oct 2020 18:43:06 -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; dkim=pass header.i=@kernel.org header.s=default header.b=jCtZnhDs; 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 S1788619AbgJZRxx (ORCPT + 99 others); Mon, 26 Oct 2020 13:53:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:45412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1780913AbgJZRxx (ORCPT ); Mon, 26 Oct 2020 13:53:53 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C63720791; Mon, 26 Oct 2020 17:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603734832; bh=1+7x8X20mneBgmOpqia3W6ELvfpsExV2ATsV8SIe8ig=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jCtZnhDs/sE7iw6ZGxPHBrsb6Jo/jdUFZy0AOrL1tSHO9Inr540hHV/I7fwQ2EfG0 5UiWs+SX8voaGg4ULdsp/27DzxeLjqRtIB8hiyy2p9mDGjclYqMB/9Jyqzatoq9dqm 10NrRiAgDGec9MDEwYROXQwQbmJadJ/bARGrvFMs= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 16E99403C2; Mon, 26 Oct 2020 14:53:49 -0300 (-03) Date: Mon, 26 Oct 2020 14:53:49 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Jiri Olsa , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Andi Kleen , Ian Rogers Subject: Re: [PATCH v2 2/2] perf stat: Support regex pattern in --for-each-cgroup Message-ID: <20201026175349.GA2449445@kernel.org> References: <20201024025918.453431-1-namhyung@kernel.org> <20201024025918.453431-2-namhyung@kernel.org> <20201026114009.GD2726983@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > > > > 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. 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. So I'll wait for v3 with that warning, Thanks, - Arnaldo