All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Borislav Petkov <bp@suse.de>,
	Brendan Gregg <brendan.d.gregg@gmail.com>,
	Chandler Carruth <chandlerc@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Stephane Eranian <eranian@google.com>,
	Wang Nan <wangnan0@huawei.com>
Subject: Re: [RFC/PATCH 3/3] perf tools: Defaults to 'caller' callchain order only if --children is enabled
Date: Thu, 22 Oct 2015 13:21:59 -0300	[thread overview]
Message-ID: <20151022162159.GH2455@kernel.org> (raw)
In-Reply-To: <CAM9d7chC9FkdFYEDic8EU3QLEmrJsY2-vv9VTjSnS7FMmdqsUg@mail.gmail.com>

Em Fri, Oct 23, 2015 at 12:51:01AM +0900, Namhyung Kim escreveu:
> On Thu, Oct 22, 2015 at 11:37 PM, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Will we also flip the default to --no-children? I would advocate that,
> > together with showing a info box telling the user about this change and
> > how to ask for it, including instructions on how to do that via
> > ~/.perfconfig.
 
> Not sure.  It seems too late to do it. ;-)

Heh, well, at least a info box, to show just once, telling where to read
about --children mode, and how to disable it, I'll probably cook this
up.
 
> >> But I should mention it'll use 'callee' ordering when --no-chlidren.
> >> I'm about to send doc fix patch Ingo requested, so please leave this
> >> patch as is.

> > Ok, its just that I thought you was already asleep and was wanting to
> > make progress on this 8-)
 
> Yeah, it's late.  I'll go to bed soon.. :)

:-)
 
> > Will wait for your patches and instead try to fix the annotation bug
> > that leads 'perf report --tui -S some_symbol_name' to exit without
> > printing anything, that Ingo reported, only happens in --tui, because
> > --stdio doesn't collects annotation info...
 
> I guess -S option works only for symbols that have self overhead..

Sure, say:

  # perf record -a sleep 1
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.171 MB perf.data (33 samples) ]
  # perf script | head -3
    perf 15174 [000] 52772.188928:  1 cycles:pp: ffffffff8105f4b8 native_write_msr_safe (/lib/modules/4.2.0/build/vmlinux)
    perf 15174 [000] 52772.188934:  1 cycles:pp: ffffffff8105f4b8 native_write_msr_safe (/lib/modules/4.2.0/build/vmlinux)
   swapper     0 [001] 52772.188971:  1 cycles:pp: ffffffff8105f4b8 native_write_msr_safe (/lib/modules/4.2.0/build/vmlinux)
  # perf report -S native_write_msr_safe
  # time perf report -S native_write_msr_safe

  real	0m0.023s
  user	0m0.019s
  sys	0m0.004s
  #

I.e. 'perf report -S symbol_that_has_self_overhead' doesn't work in --tui mode,
works in --stdio mode:

  # perf report --stdio -S native_write_msr_safe  | grep %
    59.61%  swapper  [kernel.vmlinux]
     0.17%  sleep    [kernel.vmlinux]
     0.00%  perf     [kernel.vmlinux]
  # 

Somehow we're calling symbol__inc_addr_samples() with a sample that is outside
that symbol, it returns ERANGE and we exit early, not emitting any message.

That happens only in --tui mode, --stdio doesn't call any annotation routine,
since it is not integrated with 'perf annotate' because it is not interactive.

- Arnaldo

  reply	other threads:[~2015-10-22 16:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22  6:28 [PATCH 1/3] perf tools: Move callchain help messages to callchain.h Namhyung Kim
2015-10-22  6:28 ` [PATCH 2/3] perf top: Support call-graph display options also Namhyung Kim
2015-10-22  8:23   ` Ingo Molnar
2015-10-22 12:20     ` Namhyung Kim
2015-10-22 13:57       ` Taeung Song
2015-10-22 14:34         ` Namhyung Kim
2015-10-22 18:38   ` Arnaldo Carvalho de Melo
2015-10-23  8:31   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-10-22  6:28 ` [RFC/PATCH 3/3] perf tools: Defaults to 'caller' callchain order only if --children is enabled Namhyung Kim
2015-10-22  7:32   ` Ingo Molnar
2015-10-22  7:38     ` Namhyung Kim
2015-10-22  9:49       ` Brendan Gregg
2015-10-22 14:03         ` Arnaldo Carvalho de Melo
2015-11-02 23:59           ` Brendan Gregg
2015-10-22 12:21       ` Frederic Weisbecker
2015-10-22  7:45   ` [RFC/PATCH RESEND " Namhyung Kim
2015-10-22 18:38     ` Arnaldo Carvalho de Melo
2015-10-23  8:31     ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-10-22 12:19   ` [RFC/PATCH 3/3] " Frederic Weisbecker
2015-10-22 14:13   ` Arnaldo Carvalho de Melo
2015-10-22 14:22     ` Namhyung Kim
2015-10-22 14:37       ` Arnaldo Carvalho de Melo
2015-10-22 15:51         ` Namhyung Kim
2015-10-22 16:21           ` Arnaldo Carvalho de Melo [this message]
2015-10-22  8:02 ` [PATCH 1/3] perf tools: Move callchain help messages to callchain.h Ingo Molnar
2015-10-22 12:13   ` Namhyung Kim
2015-10-22 14:17     ` Arnaldo Carvalho de Melo
2015-10-23  9:59     ` Ingo Molnar
2015-10-23 14:27       ` Arnaldo Carvalho de Melo
2015-10-23 16:40         ` Arnaldo Carvalho de Melo
2015-10-22 18:38 ` Arnaldo Carvalho de Melo
2015-10-23  8:30 ` [tip:perf/core] " tip-bot for Namhyung Kim

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=20151022162159.GH2455@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=adrian.hunter@intel.com \
    --cc=bp@suse.de \
    --cc=brendan.d.gregg@gmail.com \
    --cc=chandlerc@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.