linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, hemant@linux.vnet.ibm.com,
	naveen.n.rao@linux.vnet.ibm.com
Subject: Re: [RFC 4/4] perf kvm: Fix output fields instead of 'trace' for perf kvm report on powerpc
Date: Wed, 2 Mar 2016 11:25:56 -0300	[thread overview]
Message-ID: <20160302142556.GR3604@kernel.org> (raw)
In-Reply-To: <1456304865-15131-5-git-send-email-ravi.bangoria@linux.vnet.ibm.com>

Em Wed, Feb 24, 2016 at 02:37:45PM +0530, Ravi Bangoria escreveu:
> commit d49dadea7862 ("perf tools: Make 'trace' or 'trace_fields' sort key
> default for tracepoint events") makes 'trace' sort key as a default
> while displaying report for tracepoint.
> 
> Because tracepoint(kvm_hv:kvm_guest_exit) is used as a default event,
> perf kvm report will display output as a list of tracepoint hits and
> not with a normal report columns.
> 
> This patch will replace 'trace' field with 'overhead,comm,dso,sym' while
> displaying perf kvm report of powerpc.
> 
> Before applying patch:
> 
>   $ ./perf kvm --guestkallsyms=guest.kallsyms --guestmodules=guest.modules report --stdio
>   # To display the perf.data header info, please use --header/--header-only options.
>   #
>   #
>   # Total Lost Samples: 0
>   #
>   # Samples: 181K of event 'kvm_hv:kvm_guest_exit'
>   # Event count (approx.): 181061
>   #
>   # Overhead  Trace output
>   # ........  .................................................................................
>   #
>        0.02%  VCPU 8: trap=HV_DECREMENTER pc=0xc000000000091924 msr=0x8000000000009032, ceded=0
>        0.00%  VCPU 0: trap=HV_DECREMENTER pc=0xc000000000091924 msr=0x8000000000009032, ceded=0
>        0.00%  VCPU 8: trap=HV_DECREMENTER pc=0x10005c7c msr=0x800000000280f032, ceded=0
>        0.00%  VCPU 8: trap=HV_DECREMENTER pc=0x1001ef14 msr=0x800000000280f032, ceded=0
>        0.00%  VCPU 8: trap=HV_DECREMENTER pc=0x3fff83398830 msr=0x800000000280f032, ceded=0
>        0.00%  VCPU 8: trap=HV_DECREMENTER pc=0x3fff833a6fe4 msr=0x800000000280f032, ceded=0
>        0.00%  VCPU 8: trap=HV_DECREMENTER pc=0x3fff833a7a64 msr=0x800000000280f032, ceded=0
> 
> After applying patch:
> 
>   $ ./perf kvm --guestkallsyms=guest.kallsyms --guestmodules=guest.modules report --stdio
>   # To display the perf.data header info, please use --header/--header-only options.
>   #
>   #
>   # Total Lost Samples: 0
>   #
>   # Samples: 181K of event 'kvm_hv:kvm_guest_exit'
>   # Event count (approx.): 181061
>   #
>   # Overhead  Command  Shared Object            Symbol
>   # ........  .......  .......................  ..............................
>   #
>        0.02%  :57276   [guest.kernel.kallsyms]  [g] .plpar_hcall_norets
>        0.00%  :57274   [guest.kernel.kallsyms]  [g] .plpar_hcall_norets
>        0.00%  :57276   [guest.kernel.kallsyms]  [g] .__copy_tofrom_user_power7
>        0.00%  :57276   [guest.kernel.kallsyms]  [g] ._atomic_dec_and_lock
>        0.00%  :57276   [guest.kernel.kallsyms]  [g] ._raw_spin_lock
>        0.00%  :57276   [guest.kernel.kallsyms]  [g] ._switch
>        0.00%  :57276   [guest.kernel.kallsyms]  [g] .bio_add_page
>        0.00%  :57276   [guest.kernel.kallsyms]  [g] .kmem_cache_alloc
> 
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> ---
>  tools/perf/builtin-report.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 31ec4ba..5d96882 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -930,6 +930,11 @@ repeat:
>  	else
>  		use_browser = 0;
>  
> +	if (!field_order &&
> +	    is_perf_data_reorded_on_ppc(session->evlist) &&
> +	    perf_guest_only())
> +		field_order = "overhead,comm,dso,sym";
> +

Can you please do it as:

__weak void arch__override_field_order(struct perf_evlist *evlist, const char **field_order)
{
}

This way we don't see any arch specific stuff in the tool, also I
haven't seen any doc update, are you sure nothing needs to be added to
tools/perf/Documentaton/ for any of these patches?

I think this needs to be documented further, probably in
tools/perf/design.txt too?

>  	if (setup_sorting(session->evlist) < 0) {
>  		if (sort_order)
>  			parse_options_usage(report_usage, options, "s", 1);
> -- 
> 2.1.4

  reply	other threads:[~2016-03-02 14:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  9:07 [RFC 0/4] perf kvm: Guest Symbol Resolution for powerpc Ravi Bangoria
2016-02-24  9:07 ` [RFC 1/4] perf kvm: Enable 'record' on powerpc Ravi Bangoria
2016-03-22 19:12   ` Arnaldo Carvalho de Melo
2016-03-23  2:19     ` Arnaldo Carvalho de Melo
2016-03-24 21:15       ` Arnaldo Carvalho de Melo
2016-03-28 10:58         ` Ravi Bangoria
2016-03-28 12:28           ` Arnaldo Carvalho de Melo
2016-04-27 12:32         ` Ravi Bangoria
2016-04-27 21:47           ` Arnaldo Carvalho de Melo
2016-05-09 14:58             ` Ravi Bangoria
2016-02-24  9:07 ` [RFC 2/4] perf kvm: Introduce evsel as argument to perf_event__preprocess_sample Ravi Bangoria
2016-02-24  9:07 ` [RFC 3/4] perf kvm: Enable 'report' on powerpc Ravi Bangoria
2016-02-24  9:07 ` [RFC 4/4] perf kvm: Fix output fields instead of 'trace' for perf kvm report " Ravi Bangoria
2016-03-02 14:25   ` Arnaldo Carvalho de Melo [this message]
2016-03-02 15:46     ` Ravi Bangoria
2016-03-02 16:22       ` Arnaldo Carvalho de Melo
2016-03-03  1:19         ` Ravi Bangoria
2016-03-08 15:42           ` Ravi Bangoria

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=20160302142556.GR3604@kernel.org \
    --to=acme@kernel.org \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    /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).