linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: David Ahern <dsahern@gmail.com>,
	Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jiri Olsa <jolsa@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] perf tools: unify perf_event_attr printing
Date: Thu, 2 Apr 2015 10:12:50 +0200	[thread overview]
Message-ID: <20150402081250.GA25147@gmail.com> (raw)
In-Reply-To: <20150401162638.GN24151@twins.programming.kicks-ass.net>


* Peter Zijlstra <peterz@infradead.org> 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 <peterz@infradead.org>
> 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) <peterz@infradead.org>
> ---
>  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 <mingo@kernel.org>

Thanks,

	Ingo

  parent reply	other threads:[~2015-04-02  8:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-34f439278cef7b1177f8ce24f9fc81dfc6221d3b@git.kernel.org>
2015-03-27 14:32 ` [PATCH] perf, record: Add clockid parameter Peter Zijlstra
2015-03-27 17:11   ` David Ahern
2015-03-27 17:20     ` Peter Zijlstra
2015-03-27 17:35       ` David Ahern
2015-03-27 20:15         ` Arnaldo Carvalho de Melo
2015-03-27 21:59           ` Peter Zijlstra
2015-03-27 22:37             ` Stephane Eranian
2015-03-28  7:55               ` Peter Zijlstra
2015-03-30  1:00                 ` David Ahern
2015-03-30  8:24                   ` Peter Zijlstra
2015-03-30 17:11                     ` David Ahern
2015-03-30  9:17                 ` Peter Zijlstra
2015-03-30 17:17                   ` David Ahern
2015-03-30 19:32                     ` Peter Zijlstra
2015-03-30 19:39                       ` David Ahern
2015-03-30 17:24                 ` David Ahern
2015-03-30 19:33                   ` Peter Zijlstra
2015-03-30 19:41                     ` David Ahern
2015-03-30 19:43                       ` Stephane Eranian
2015-03-31  8:19                       ` Peter Zijlstra
2015-03-31 10:46                         ` [RFC][PATCH] perf tools: unify perf_event_attr printing Peter Zijlstra
2015-04-01 16:26                           ` Peter Zijlstra
2015-04-01 16:52                             ` Jiri Olsa
2015-04-02  9:01                               ` Adrian Hunter
2015-04-02 11:59                                 ` Peter Zijlstra
2015-04-02 12:54                                   ` Adrian Hunter
2015-04-03 16:11                                   ` Arnaldo Carvalho de Melo
2015-04-03 16:14                                     ` Arnaldo Carvalho de Melo
2015-04-02  8:12                             ` Ingo Molnar [this message]
2015-04-02 22:28                               ` Arnaldo Carvalho de Melo
2015-04-02  9:19                             ` Jiri Olsa
2015-03-30 17:33                 ` [PATCH] perf, record: Add clockid parameter David Ahern
2015-03-30 19:34                   ` Peter Zijlstra
2015-03-30 19:46                     ` David Ahern
2015-03-27 23:07           ` Stephane Eranian
2015-03-27 16:31 ` [tip:perf/timer] perf: Add per event clockid support Stephane Eranian
2015-03-27 16:35   ` Peter Zijlstra
2015-03-27 16:52     ` Stephane Eranian
2015-03-27 16:57       ` Peter Zijlstra
2015-03-27 17:00         ` Stephane Eranian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150402081250.GA25147@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=hpa@zytor.com \
    --cc=john.stultz@linaro.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).