From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755651AbdEEH57 (ORCPT ); Fri, 5 May 2017 03:57:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43978 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753369AbdEEH56 (ORCPT ); Fri, 5 May 2017 03:57:58 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7B9DA5146B 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 7B9DA5146B Date: Fri, 5 May 2017 09:57:54 +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: <20170505075754.GA7540@krava> References: <20170501194746.10296-1-andi@firstfloor.org> <20170502064147.GB23708@krava> <20170504222620.GT22592@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170504222620.GT22592@two.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]); Fri, 05 May 2017 07:57:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 04, 2017 at 03:26:20PM -0700, Andi Kleen wrote: > On Tue, May 02, 2017 at 08:41:47AM +0200, Jiri Olsa wrote: > > 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? > > Cannot reproduce. Do you have an exact command line? > > The patch shouldn't really change any columns. > [jolsa@krava perf]$ ./perf record -a ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.527 MB perf.data (2533 samples) ] [jolsa@krava perf]$ ./perf script -F pid,cpu,time,event,sym,ip,dso,period > 1 Failed to open /tmp/perf-1841.map, continuing without symbols /run/user/1000/orcexec.1yoPtl was updated (is prelink enabled?). Restart the long running apps that use it! [vdso] with build id 0b94eba680f6a3bb2e3efbde9a2551c1f5b27e34 not found, continuing without symbols [jolsa@krava perf]$ ./perf script -F -comm > 2 Failed to open /tmp/perf-1841.map, continuing without symbols /run/user/1000/orcexec.1yoPtl was updated (is prelink enabled?). Restart the long running apps that use it! [vdso] with build id 0b94eba680f6a3bb2e3efbde9a2551c1f5b27e34 not found, continuing without symbols [jolsa@krava perf]$ diff -puw 1 2 | head -20 --- 1 2017-05-05 09:56:00.088148174 +0200 +++ 2 2017-05-05 09:56:04.469166203 +0200 @@ -6,16 +6,16 @@ 0 [000] 10374.768173: 1680 cycles: ffffffff94116904 __next_timer_interrupt ([kernel.kallsyms]) 0 [000] 10374.768174: 32136 cycles: ffffffff94116904 __next_timer_interrupt ([kernel.kallsyms]) 0 [000] 10374.768187: 846579 cycles: ffffffff9484f3f6 __schedule ([kernel.kallsyms]) - 1706 [000] 10374.774848: 2417537 cycles: 7f362deaaf5e [unknown] (/usr/lib64/firefox/libxul.so) - 1706 [003] 10374.775161: 31151 cycles: ffffffff940dc520 update_blocked_averages ([kernel.kallsyms]) - 1841 [002] 10374.775163: 41524 cycles: ffffffff940f3ec9 queued_spin_lock_slowpath ([kernel.kallsyms]) + 1769 [000] 10374.774848: 2417537 cycles: 7f362deaaf5e [unknown] (/usr/lib64/firefox/libxul.so) + 1723 [003] 10374.775161: 31151 cycles: ffffffff940dc520 update_blocked_averages ([kernel.kallsyms]) + 1844 [002] 10374.775163: 41524 cycles: ffffffff940f3ec9 queued_spin_lock_slowpath ([kernel.kallsyms]) 0 [001] 10374.775168: 24203 cycles: ffffffff940d7e24 sched_clock_idle_wakeup_event ([kernel.kallsyms]) - 1706 [003] 10374.775175: 31151 cycles: ffffffff94704227 copy_msghdr_from_user ([kernel.kallsyms]) + 1723 [003] 10374.775175: 31151 cycles: ffffffff94704227 copy_msghdr_from_user ([kernel.kallsyms]) 1841 [001] 10374.775178: 24203 cycles: 7f298cdb1d1b [unknown] (/usr/lib64/firefox/libxul.so) - 1841 [002] 10374.775181: 41524 cycles: ffffffff940ead8e __wake_up_common ([kernel.kallsyms]) - 1706 [003] 10374.775188: 94430 cycles: ffffffff9438a7cb selinux_file_permission ([kernel.kallsyms]) + 1844 [002] 10374.775181: 41524 cycles: ffffffff940ead8e __wake_up_common ([kernel.kallsyms]) + 1723 [003] 10374.775188: 94430 cycles: ffffffff9438a7cb selinux_file_permission ([kernel.kallsyms]) [jolsa@krava perf]$ jirka