From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753083AbdEIMS2 (ORCPT ); Tue, 9 May 2017 08:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43068 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbdEIMS1 (ORCPT ); Tue, 9 May 2017 08:18:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0DDF580C10 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0DDF580C10 Date: Tue, 9 May 2017 14:18:25 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] perf, tools, script: Allow adding and removing fields Message-ID: <20170509121825.GA9983@krava> References: <20170508162134.6265-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170508162134.6265-1-andi@firstfloor.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 09 May 2017 12:18:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 08, 2017 at 09:21:34AM -0700, Andi Kleen wrote: > From: Andi Kleen > > With perf script it is common that we just want to add or remove a field. > Currently this requires figuring out the long list of default fields and > specifying them first, and then adding/removing the new field. > > This patch adds a new + - syntax to merely add or remove fields, > that allows more succint and clearer command lines > > For example to remove the comm field from PMU samples: > > Previously > > perf script -F tid,cpu,time,event,sym,ip,dso,period > 0 [000] 504345.383126: 1 cycles: ffffffff90060c66 native_write_msr ([kernel.kallsyms]) > > with the new syntax > > perf script -F -comm > 0 [000] 504345.383126: 1 cycles: ffffffff90060c66 native_write_msr ([kernel.kallsyms]) > > The new syntax cannot be mixed with normal overriding. so the -F option for 'type:' does not have default set, and it looks like the +- don't make sense there: [jolsa@krava perf]$ ./perf script -F hw:+comm | head -3 ex ex ex jirka