Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753475AbbDBIOb (ORCPT ); Thu, 2 Apr 2015 04:14:31 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:36321 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753407AbbDBIMz (ORCPT ); Thu, 2 Apr 2015 04:12:55 -0400 Date: Thu, 2 Apr 2015 10:12:50 +0200 From: Ingo Molnar To: Peter Zijlstra Cc: David Ahern , Stephane Eranian , Arnaldo Carvalho de Melo , Thomas Gleixner , Jiri Olsa , Linus Torvalds , LKML , John Stultz , "H. Peter Anvin" , Andrew Morton Subject: Re: [RFC][PATCH] perf tools: unify perf_event_attr printing Message-ID: <20150402081250.GA25147@gmail.com> References: <20150327201534.GD6291@redhat.com> <20150327215942.GL23123@twins.programming.kicks-ass.net> <20150328075549.GG27490@worktop.programming.kicks-ass.net> <551986BC.3000409@gmail.com> <20150330193318.GF23123@twins.programming.kicks-ass.net> <5519A6D8.9060806@gmail.com> <20150331081955.GQ27490@worktop.programming.kicks-ass.net> <20150331104648.GD32047@worktop.ger.corp.intel.com> <20150401162638.GN24151@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150401162638.GN24151@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4011 Lines: 114 * Peter Zijlstra wrote: > With some feedback from Jolsa, who showed me how to trigger the actual > outputs. > > --- > > Subject: perf, tools: Merge all perf_event_attr print functions > From: Peter Zijlstra > Date: Tue Mar 31 13:01:54 CEST 2015 > > Currently there's 3 (that I found) different and incomplete > implementations of printing perf_event_attr. > > This is quite silly. Merge the lot. > > While this patch does not retain the exact form all printing that I > found is debug output and thus it should not be critical. > > Also, I cannot find a single print_event_desc() caller. > > Pre: > > $ perf record -vv -e cycles -- sleep 1 > ------------------------------------------------------------ > perf_event_attr: > type 0 > size 104 > config 0 > sample_period 4000 > sample_freq 4000 > sample_type 0x107 > read_format 0 > disabled 1 inherit 1 > pinned 0 exclusive 0 > exclude_user 0 exclude_kernel 0 > exclude_hv 0 exclude_idle 0 > mmap 1 comm 1 > mmap2 1 comm_exec 1 > freq 1 inherit_stat 0 > enable_on_exec 1 task 1 > watermark 0 precise_ip 0 > mmap_data 0 sample_id_all 1 > exclude_host 0 exclude_guest 1 > excl.callchain_kern 0 excl.callchain_user 0 > wakeup_events 0 > wakeup_watermark 0 > bp_type 0 > bp_addr 0 > config1 0 > bp_len 0 > config2 0 > branch_sample_type 0 > sample_regs_user 0 > sample_stack_user 0 > sample_regs_intr 0 > ------------------------------------------------------------ > > $ perf evlist -vv > cycles: sample_freq=4000, size: 104, sample_type: IP|TID|TIME|PERIOD, > disabled: 1, inherit: 1, mmap: 1, mmap2: 1, comm: 1, comm_exec: 1, > freq: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: > 1 > > Post: > > $ ./perf record -vv -e cycles -- sleep 1 > ------------------------------------------------------------ > perf_event_attr: > size 112 > { sample_period, sample_freq } 4000 > sample_type IP|TID|TIME|PERIOD > disabled 1 > inherit 1 > mmap 1 > comm 1 > freq 1 > enable_on_exec 1 > task 1 > sample_id_all 1 > exclude_guest 1 > mmap2 1 > comm_exec 1 > ------------------------------------------------------------ > > $ ./perf evlist -vv > cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: > IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: > 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, > mmap2: 1, comm_exec: 1 > > Cc: acme@redhat.com > Cc: jolsa@redhat.com > Signed-off-by: Peter Zijlstra (Intel) > --- > tools/perf/util/Build | 1 > tools/perf/util/evsel.c | 181 ++++++----------------------------------- > tools/perf/util/header.c | 34 ++----- > tools/perf/util/print_attr.h | 69 +++++++++++++++ > tools/perf/util/print_helper.c | 52 +++++++++++ > tools/perf/util/print_helper.h | 7 + > 6 files changed, 170 insertions(+), 174 deletions(-) Acked-by: Ingo Molnar Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/