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>
Subject: Re: [PATCH v3 10/10] perf tools: Move TUI-specific fields out of map_symbol
Date: Tue, 5 May 2015 13:00:54 -0300	[thread overview]
Message-ID: <20150505160054.GX10475@kernel.org> (raw)
In-Reply-To: <1430837746-5439-1-git-send-email-namhyung@kernel.org>

Em Tue, May 05, 2015 at 11:55:46PM +0900, Namhyung Kim escreveu:
> The has_children and unfolded fields don't belong to struct map_symbol
> since they're used by TUI only.  Move those fields out of map_symbol
> since the struct is also used by other places.
> 
> This will also help to compact the sizeof struct hist_entry.

So this fixes that problem, but to test this patchkit a bit more before
commiting it, I tried the following:

1) perf record -a -g sleep 2

2) perf report

3) press E to expand all callchains

4) press P to save a perf.hist.0 "screenshot" of all the hist entries
   and its callchains, in their current state, i.e. expanded


Ok I did this with and without your patchset, and there are differences
in the result, that I don't know if are unintended fixes or how to
account them for, could you try reproducing these steps to see if you
notice this difference too?

Ok, now I understand, its a bug, when collecting callchains we need to
process them all, marking the DSOs that had hits _in the callchains_ and
save the build-id for those in the perf.data header, in addition to
saving the DSO in the buildid cache.

What happened was that the different entries I noticed where all in the
callchains, and the perf tool got rebuilt, and all the samples, in my
case, were in kernel functions, that were called by the perf binary....

So for something like:

--- perf.hist.0.WITHOUT 2015-05-05 12:49:06.557802910 -0300
+++ perf.hist.0.WITH_NAMHYUNG_PATCHSET  2015-05-05 12:48:13.871216253 -0300
@@ -167,26 +167,26 @@
 -    0.07%     0.00%  perf            perf                        [.] main
      main
      __libc_start_main
--    0.07%     0.00%  perf            perf                        [.] browser_command_config
-     browser_command_config
+-    0.07%     0.00%  perf            perf                        [.] run_builtin

And I collected the perf.data with your patchset applied, the correct is to
appear "run_builtin", not like here:

-    0.07%     0.00%  perf            perf                        [.] browser_command_config
     browser_command_config
     main

This is all because the perf binary used got lost, replaced by the new one, as it
wasn't saved in the perf.data file header/~/.debug/ cache:

[root@ssdandy linux]# perf buildid-list
cd1d2cf9f473d0cac668e3afee32866da4540bd4 /lib/modules/4.0.0-rc6+/build/vmlinux
2c07e0dc941be12d3db663ea617c08cf10dbbfa1 /lib/modules/4.0.0-rc6+/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
[root@ssdandy linux]#

The fix probably will make the buildid collection at the end of a 'perf record'
session more expensive, will try to fix this...

But your patch is not responsible for this, so thanks for the fixes and
I'm applying it.

- Arnaldo

  reply	other threads:[~2015-05-05 16:11 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22  7:18 [PATCHSET 00/10] perf tools: Assorted cleanup for TUI (v3) Namhyung Kim
2015-04-22  7:18 ` [PATCH 01/10] perf tools: Move TUI-specific fields into unnamed union Namhyung Kim
2015-04-22 11:57   ` Arnaldo Carvalho de Melo
2015-05-06  3:19   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 02/10] perf tools: Move init_have_children field to the " Namhyung Kim
2015-05-06  3:20   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 03/10] perf hists browser: Fix possible memory leak Namhyung Kim
2015-05-06  3:20   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 04/10] perf hists browser: Save hist_browser_timer pointer in hist_browser Namhyung Kim
2015-05-06  3:20   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 05/10] perf hists browser: Save pstack in the hist_browser Namhyung Kim
2015-05-06  3:21   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 06/10] perf hists browser: Save perf_session_env " Namhyung Kim
2015-05-06  3:21   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 07/10] perf hists browser: Split popup menu actions Namhyung Kim
2015-05-06  3:21   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 08/10] perf hists browser: Split popup menu actions - part 2 Namhyung Kim
2015-04-22 10:54   ` Jiri Olsa
2015-04-22 13:03     ` Namhyung Kim
2015-04-22 13:25       ` Arnaldo Carvalho de Melo
2015-04-22 13:32         ` Namhyung Kim
2015-04-22 13:41           ` Jiri Olsa
2015-04-22 13:53             ` Namhyung Kim
2015-04-22 14:02               ` Jiri Olsa
2015-05-06  3:21   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 09/10] perf hists browser: Simplify zooming code a bit Namhyung Kim
2015-04-23 22:30   ` Arnaldo Carvalho de Melo
2015-04-24  1:15     ` [PATCH v2 9/10] perf tools: Introduce pstack_peek() Namhyung Kim
2015-04-24  1:15       ` [PATCH v2 9.5/10] perf hists browser: Simplify zooming code using pstack_peek() Namhyung Kim
2015-05-06  3:22         ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-05-06  3:22       ` [tip:perf/core] perf tools: Introduce pstack_peek() tip-bot for Namhyung Kim
2015-04-22  7:18 ` [PATCH 10/10] perf tools: Move TUI-specific fields out of map_symbol Namhyung Kim
2015-04-27 17:20   ` Arnaldo Carvalho de Melo
2015-04-28  7:30     ` Namhyung Kim
2015-04-28 12:29       ` Arnaldo Carvalho de Melo
2015-05-04 15:42   ` Arnaldo Carvalho de Melo
2015-05-04 15:51     ` Arnaldo Carvalho de Melo
2015-05-05  1:12       ` Namhyung Kim
2015-05-05 14:07         ` Arnaldo Carvalho de Melo
2015-05-05 14:22           ` Namhyung Kim
2015-05-05  1:18       ` [PATCH v2 " Namhyung Kim
2015-05-05 14:22         ` Arnaldo Carvalho de Melo
2015-05-05 14:26           ` Arnaldo Carvalho de Melo
2015-05-05 14:40             ` Namhyung Kim
2015-05-05 14:55             ` [PATCH v3 " Namhyung Kim
2015-05-05 16:00               ` Arnaldo Carvalho de Melo [this message]
2015-05-06  3:22               ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-22 11:12 ` [PATCHSET 00/10] perf tools: Assorted cleanup for TUI (v3) Jiri Olsa
2015-04-22 13:05   ` 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=20150505160054.GX10475@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.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 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.