From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751331AbdEBGlv (ORCPT ); Tue, 2 May 2017 02:41:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59516 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbdEBGlu (ORCPT ); Tue, 2 May 2017 02:41:50 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 87334222A27 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 87334222A27 Date: Tue, 2 May 2017 08:41:47 +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: <20170502064147.GB23708@krava> References: <20170501194746.10296-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170501194746.10296-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.39]); Tue, 02 May 2017 06:41:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 01, 2017 at 12:47:46PM -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 pid,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]) I haven't checked deeply yet, but I'm getting different pids with the new syntax, perhaps some mixing with tids column? 0 [002] 42615.004240: 2172 cycles: ffffffff86060c66 native_write_msr ([kernel.kallsyms]) 0 [002] 42615.004242: 19857 cycles: ffffffff860abee0 irq_exit ([kernel.kallsyms]) 0 [002] 42615.004250: 412618 cycles: ffffffff860d1429 ttwu_do_wakeup ([kernel.kallsyms]) - 1798 [001] 42615.008219: 46557 cycles: ffffffff860dc718 update_blocked_averages ([kernel.kallsyms]) - 1798 [001] 42615.008239: 46557 cycles: 7f313dff0684 [unknown] (/usr/lib64/firefox/libxul.so) - 1798 [001] 42615.008258: 112387 cycles: 7f313e32c71a [unknown] (/usr/lib64/firefox/libxul.so) + 1861 [001] 42615.008219: 46557 cycles: ffffffff860dc718 update_blocked_averages ([kernel.kallsyms]) + 1861 [001] 42615.008239: 46557 cycles: 7f313dff0684 [unknown] (/usr/lib64/firefox/libxul.so) + 1861 [001] 42615.008258: 112387 cycles: 7f313e32c71a [unknown] (/usr/lib64/firefox/libxul.so) 1687 [002] 42615.008268: 1711528 cycles: ffffffffc01e74c7 i915_gem_set_domain_ioctl ([i915]) - 1798 [001] 42615.008303: 281652 cycles: ffffffff860dc169 account_entity_dequeue ([kernel.kallsyms]) + 1861 [001] 42615.008303: 281652 cycles: ffffffff860dc169 account_entity_dequeue ([kernel.kallsyms]) 1798 [001] 42615.008440: 442473 cycles: 7f3147c6935b g_slice_free1 (/usr/lib64/libglib-2.0.so.0.5000.3) - 1935 [001] 42615.009462: 487718 cycles: ffffffff860f25bc cpuacct_charge ([kernel.kallsyms]) - 1935 [002] 42615.009955: 1711528 cycles: 7fa2a2ac748f [unknown] (/usr/lib64/firefox/libmozavcodec.so) - 1935 [001] 42615.009989: 441676 cycles: 559627e901da [unknown] (/usr/lib64/firefox/firefox) - 1935 [000] 42615.010233: 79099 cycles: 7fa2c2a11fa9 [unknown] (/usr/lib64/firefox/libxul.so) +24128 [001] 42615.009462: 487718 cycles: ffffffff860f25bc cpuacct_charge ([kernel.kallsyms]) +24182 [002] 42615.009955: 1711528 cycles: 7fa2a2ac748f [unknown] (/usr/lib64/firefox/libmozavcodec.so) +24181 [001] 42615.009989: 441676 cycles: 559627e901da [unknown] (/usr/lib64/firefox/firefox) +24112 [000] 42615.010233: 79099 cycles: 7fa2c2a11fa9 [unknown] (/usr/lib64/firefox/libxul.so) thanks, jirka