linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Li Zefan <lizf@cn.fujitsu.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>,
	LKML <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [RFC][PATCH 1/2] perf: Add 'perf kmem' tool
Date: Mon, 23 Nov 2009 12:32:36 -0200	[thread overview]
Message-ID: <20091123143236.GB15547@ghostprotocols.net> (raw)
In-Reply-To: <20091123065110.GC31758@elte.hu>

Em Mon, Nov 23, 2009 at 07:51:10AM +0100, Ingo Molnar escreveu:
> 
> * Arnaldo Carvalho de Melo <acme@infradead.org> wrote:
> 
> > Em Fri, Nov 20, 2009 at 05:41:10PM +0100, Ingo Molnar escreveu:
> > > > So we have a mechanism that is already present in several distros
> > > > (build-id), that is in the kernel build process since ~2.6.23, and that
> > > > avoids using mismatching DSOs when resolving symbols.
> > > 
> > > But what do we do if we have another box that runs say on a MIPS CPU, 
> > > uses some minimal distro - and copy that perf.data over to an x86 box.
> > 
> > There would be no problem, it would be just a matter of installing the
> > right -debuginfo packages, for MIPS.
> 
> I havent tried this - is this really possible to do on an x86 box, with 
> a typical distro? Can i install say Fedora PowerPC debuginfo packages on 
> an x86 box, while also having the x86 debuginfo packages there?

I should have added "in theory", as I haven't tested this as well using
the current tools, but it should :)
 
> > Or the original, unstripped FS image sent to the machine with the MIPS 
> > cpu, if there aren't -debuginfo packages.
> > 
> > Either one, the right DSOs would be found by the buildids.
> > 
> > There are other scenarios, like a binary that gets updated while a long
> > running perf record session runs, the way to differentiate between the
> > two DSOs wouldn't be the name, but the buildid.
> > 
> > > The idea is there to be some new mode of perf.data where all the 
> > > relevant DSO contents (symtabs but also sections with instructions for 
> > > perf annotate to work) are copied into perf.data, during or after data 
> > > capture - on the box that does the recording.
> > > 
> > > Once we have everything embedded in the perf.data, analysis passes only 
> > > have to work based on that particular perf.data - no external data.
> > 
> > Well, we can that, additionally, but think about stripped binaries, we 
> > would lose potentially a lot because the symtabs on that small machine 
> > would have poorer symtabs than the ones in an unstriped binary (or in 
> > a -debuginfo package).
> 
> We should definitely use the widest and best quality information we can 
> - if it's available.
> 
> So even if we 'inline' any information from the box, if there's better 
> info available at the time of analysis, we should use that too.
> 
> Basically what matters is the principle of 'what is possible'.
> 
> If a user records on a box and analyses on a different box, and we end 
> up not doing something (and printing an error or displaying an empty 
> profile) that could reasonably have been done, then the user will be 
> unhappy and we might lose that user.
> 
> The user wont be unhappy about us using a big set of data sources that 
> we can recover information from transparently. The user will be unhappy 
> if we insist on (and force) a certain form of information source - such 
> as debuginfo.

Sure thing, I'm thinking about how to encode the perf.data file inside
an ELF section while merging all symtabs to reduce size by sharing the
strings table, etc.

The dso__load routine already does that fallback from what is best
(debuginfo packages) to what is available (the symtab, dynsym tables in
the DSO itself), its just a matter of efficiently encoding the symtabs
into the perf.data file and that will be another source of symbols if
the preferred one (debuginfo) is not available.

- Arnaldo

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2009-11-23 14:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20  7:53 Li Zefan
2009-11-20  7:53 ` [PATCH 2/2] tracing: Remove kmemtrace tracer Li Zefan
2009-11-20  8:20   ` Pekka Enberg
2009-11-20  8:24     ` Li Zefan
2009-11-20  8:27       ` Pekka Enberg
2009-11-20  8:31         ` Li Zefan
2009-11-20  8:14 ` [RFC][PATCH 1/2] perf: Add 'perf kmem' tool Ingo Molnar
2009-11-20  8:19   ` Pekka Enberg
2009-11-20  8:30     ` Ingo Molnar
2009-11-20  8:47       ` Pekka Enberg
2009-11-20  8:53         ` Li Zefan
2009-11-20  9:03           ` Ingo Molnar
2009-11-20  9:14             ` Li Zefan
2009-11-20 14:42             ` Arnaldo Carvalho de Melo
2009-11-20 16:41               ` Ingo Molnar
2009-11-20 17:52                 ` Arnaldo Carvalho de Melo
2009-11-23  6:51                   ` Ingo Molnar
2009-11-23  7:22                     ` Peter Zijlstra
2009-11-23  7:33                       ` Ingo Molnar
2009-11-23 14:37                       ` Arnaldo Carvalho de Melo
2009-11-23 14:32                     ` Arnaldo Carvalho de Melo [this message]
2009-11-20  9:01         ` Ingo Molnar
2009-11-20  9:15           ` Pekka Enberg
2009-11-20 10:13             ` Ingo Molnar
2009-11-20 10:31               ` Pekka Enberg
2009-11-20 10:49                 ` Ingo Molnar
2009-11-23 14:46                   ` Steven Rostedt
2009-11-23 17:53                     ` Ingo Molnar
2009-11-20  8:20   ` Li Zefan
2009-11-20  8:54 ` [tip:perf/core] " tip-bot for Li Zefan
2009-11-20  8:55 ` [RFC][PATCH 1/2] " Ingo Molnar
2009-11-20  9:11   ` Li Zefan

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=20091123143236.GB15547@ghostprotocols.net \
    --to=acme@infradead.org \
    --cc=eduard.munteanu@linux360.ro \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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