All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] perf tools: adjust symbol address
Date: Thu, 31 Dec 2009 19:30:04 +0800	[thread overview]
Message-ID: <4B3C8B3C.7070400@cn.fujitsu.com> (raw)
In-Reply-To: <20091231110843.GF2384@ghostprotocols.net>



Arnaldo Carvalho de Melo wrote:
> Em Thu, Dec 31, 2009 at 06:49:01PM +0800, Xiao Guangrong escreveu:
>>
>> Arnaldo Carvalho de Melo wrote:
>>
>>>> vmlinux* not know it's relocation or not, and we just handle the _specific_
>>>> kernel at the time which match the current system. 
>>> 'perf record' in one machine + 'perf report' in another should be
>>> possible.
>>>  
>> Yeah, but current code not support this since it not record kernel build-id in
>> perf.data while 'perf record' works, maybe you can fix it.
> 
> Huh? Checking...
> 
> [root@ana tmp]# perf record -a -f sleep 1s
> [ perf record: Woken up 3 times to write data ]
> [ perf record: Captured and wrote 0.330 MB perf.data (~14404 samples) ]
> [root@ana tmp]# perf buildid-list | grep kallsyms
> a3301c8755357466e39d71b46e8f69aecf83c0e8 [kernel.kallsyms]
> a3301c8755357466e39d71b46e8f69aecf83c0e8 [kernel.kallsyms]
> [root@ana tmp]#
> 
> In fact there is a bug, but the bug is either in 'perf buildid-list'
> showing it twice or it being recorded twice in 'perf record'.
> 

Ah, it seems some perf tools like 'perf kmem/sched' not use the build-id which it's
recorded in perf.data and it use the current kernel's build-id:

perf kmem/sched -> perf_session__new() -> perf_session__create_kernel_maps() ->
map_groups__create_kernel_maps() -> dsos__create_kernel():

sysfs__read_build_id("/sys/kernel/notes", kernel->build_id,
				 sizeof(kernel->build_id)

Hope i not misunderstand it. :-)

Xiao

      reply	other threads:[~2009-12-31 11:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30  3:15 [PATCH 0/3] perf_event: fix getting symbol error if kernel is relocatable Xiao Guangrong
2009-12-30  3:16 ` [PATCH 1/3] x86: record relocation offset Xiao Guangrong
2009-12-30 13:15   ` Arnaldo Carvalho de Melo
2009-12-30 19:45     ` H. Peter Anvin
2009-12-30 20:39       ` Arnaldo Carvalho de Melo
2009-12-30 21:58         ` Arnaldo Carvalho de Melo
2009-12-30 22:22           ` James Bottomley
2009-12-30  3:17 ` [PATCH 2/3] perf_event: support getting " Xiao Guangrong
2009-12-30  3:18 ` [PATCH 3/3] perf tools: adjust symbol address Xiao Guangrong
2009-12-30 13:10   ` Arnaldo Carvalho de Melo
2009-12-31  2:59     ` Xiao Guangrong
2009-12-31 10:29       ` Arnaldo Carvalho de Melo
2009-12-31 10:49         ` Xiao Guangrong
2009-12-31 11:08           ` Arnaldo Carvalho de Melo
2009-12-31 11:30             ` Xiao Guangrong [this message]

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=4B3C8B3C.7070400@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=acme@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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.