All of lore.kernel.org
 help / color / mirror / Atom feed
* Questions about OProfile
@ 2011-04-05 17:03 W. Michael Petullo
  2011-04-05 17:49 ` Anil Madhavapeddy
  0 siblings, 1 reply; 8+ messages in thread
From: W. Michael Petullo @ 2011-04-05 17:03 UTC (permalink / raw)
  To: xen-devel

The Xenoprof page, http://xenoprof.sourceforge.net/, asks that
OProfile-related questions be sent to the xen-devel mailing list.

I am interested in passive domain profiling using OProfile. I have
downloaded the 0.9.5 patch, modified it so it applies against 0.9.6 and
built OProfile for Fedora [1]. I have not yet had success performing
passive profiling of a DomU. I am using "Tutorial: Profiling in Xen"
by J. Renato Santos and have some questions.

First, what is the status of Xenoprof? The latest patch is against 0.9.5,
but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
maintained?

Second, should I expect Xenoprof to work with Linux 2.6.38 and Xen 4.1? I
have observed the following:

	No Xen: works fine.

	Xen Dom0: receive "error: no sample files found: profile
	specification too strict."

	Xen Dom0, module option timer=1: profiling Dom0 works fine but
	I don't see any statistics from DomU; I also see
	"/usr/bin/opcontrol: line 1430: /dev/oprofile/passive_domains:
	Permission denied" In fact, /dev/oprofile/passive_domains does
	not exist. Has the kernel dropped support for the passive
	profiling of domains?

[1] https://bugzilla.redhat.com/show_bug.cgi?id=693596

-- 
Mike

:wq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Questions about OProfile
  2011-04-05 17:03 Questions about OProfile W. Michael Petullo
@ 2011-04-05 17:49 ` Anil Madhavapeddy
  2011-04-05 21:45   ` W. Michael Petullo
  0 siblings, 1 reply; 8+ messages in thread
From: Anil Madhavapeddy @ 2011-04-05 17:49 UTC (permalink / raw)
  To: W. Michael Petullo; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 778 bytes --]

On 5 Apr 2011, at 10:03, W. Michael Petullo wrote:
> 
> First, what is the status of Xenoprof? The latest patch is against 0.9.5,
> but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
> maintained?
> 

There is a crufty pv_ops patch that I forward ported to 2.6.32 in this tree:

https://github.com/avsm/linux-2.6.32-xen-oprofile

It's not suitable for upstreaming, but passive profiling of domains works fine for me using this kernel.  Ian Pratt suggested dropping active profiling in order to simplify the patch: does anyone actually use active profiling?

Jeremy also pointed out the new perf framework in Linux to me at the hackathon, but I haven't had a chance to look at how it works:
https://perf.wiki.kernel.org/index.php/Main_Page

-anil


[-- Attachment #1.2: Type: text/html, Size: 1278 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Questions about OProfile
  2011-04-05 17:49 ` Anil Madhavapeddy
@ 2011-04-05 21:45   ` W. Michael Petullo
  2011-04-05 21:53     ` Anil Madhavapeddy
  0 siblings, 1 reply; 8+ messages in thread
From: W. Michael Petullo @ 2011-04-05 21:45 UTC (permalink / raw)
  To: Anil Madhavapeddy; +Cc: xen-devel

>> First, what is the status of Xenoprof? The latest patch is against 0.9.5,
>> but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
>> maintained?
 
> There is a crufty pv_ops patch that I forward ported to 2.6.32 in this tree:
> 
> https://github.com/avsm/linux-2.6.32-xen-oprofile

So, is it true that I need to 1) use this patch or 2) use a non-PV
Ops Dom0? I thought 2.6.32 was already non-PV Ops.

> It's not suitable for upstreaming, but passive profiling of domains 
> works fine for me using this kernel.  Ian Pratt suggested dropping 
> active profiling in order to simplify the patch: does anyone actually 
> use active profiling?

I am especially interested in passive profiling because I wish to profile
experimental kernels. Developing on top of Xen is a big win for this type
of work precisely because of tools like gdbsx and passive profiling. With
this capability, there is no need to spend time adding debugging or
profiling features into a new kernel.

> Jeremy also pointed out the new perf framework in Linux to me at the
> hackathon, but I haven't had a chance to look at how it works:
>
> https://perf.wiki.kernel.org/index.php/Main_Page

-- 
Mike

:wq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Questions about OProfile
  2011-04-05 21:45   ` W. Michael Petullo
@ 2011-04-05 21:53     ` Anil Madhavapeddy
  2011-04-06 16:31       ` W. Michael Petullo
  2011-04-18 18:33       ` W. Michael Petullo
  0 siblings, 2 replies; 8+ messages in thread
From: Anil Madhavapeddy @ 2011-04-05 21:53 UTC (permalink / raw)
  To: W. Michael Petullo; +Cc: xen-devel

On 5 Apr 2011, at 14:45, W. Michael Petullo wrote:

>>> First, what is the status of Xenoprof? The latest patch is against 0.9.5,
>>> but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
>>> maintained?
> 
>> There is a crufty pv_ops patch that I forward ported to 2.6.32 in this tree:
>> 
>> https://github.com/avsm/linux-2.6.32-xen-oprofile
> 
> So, is it true that I need to 1) use this patch or 2) use a non-PV
> Ops Dom0? I thought 2.6.32 was already non-PV Ops.

I don't understand the question. The above tree is a pv_ops kernel, with additional patches applied so it can be a full Xen dom0 (including netback, etc).  I'm only sporadically updating it as I need to, so you probably just want the oprofile patch [1] if you want to apply it to some other kernel.

https://github.com/avsm/linux-2.6.32-xen-oprofile/commit/4df4780e638d14249b7aa4005511218a9183c324

-anil

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Questions about OProfile
  2011-04-05 21:53     ` Anil Madhavapeddy
@ 2011-04-06 16:31       ` W. Michael Petullo
  2011-04-11 14:22         ` Konrad Rzeszutek Wilk
  2011-04-18 18:33       ` W. Michael Petullo
  1 sibling, 1 reply; 8+ messages in thread
From: W. Michael Petullo @ 2011-04-06 16:31 UTC (permalink / raw)
  To: Anil Madhavapeddy; +Cc: xen-devel

>>>> First, what is the status of Xenoprof? The latest patch is against 0.9.5,
>>>> but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
>>>> maintained?

>>> There is a crufty pv_ops patch that I forward ported to 2.6.32 in this tree:
>>> 
>>> https://github.com/avsm/linux-2.6.32-xen-oprofile

>> So, is it true that I need to 1) use this patch or 2) use a non-PV
>> Ops Dom0? I thought 2.6.32 was already non-PV Ops.
 
> I don't understand the question. The above tree is a pv_ops kernel,
> with additional patches applied so it can be a full Xen dom0 (including
> netback, etc).  I'm only sporadically updating it as I need to, so you
> probably just want the oprofile patch [1] if you want to apply it to
> some other kernel.

> https://github.com/avsm/linux-2.6.32-xen-oprofile/commit/4df4780e638d14249b7aa4005511218a9183c324

Thanks, Anil. I was able to get your patch to work. If anyone is
interested in what I did, please see:

	https://bugzilla.redhat.com/show_bug.cgi?id=693596#c2

An a related note, would there be any interest in cleaning up this patch
and moving it to 2.6.38 as a part of Google Summer of Code?

-- 
Mike

:wq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Questions about OProfile
  2011-04-06 16:31       ` W. Michael Petullo
@ 2011-04-11 14:22         ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-04-11 14:22 UTC (permalink / raw)
  To: W. Michael Petullo; +Cc: xen-devel, Anil Madhavapeddy

On Wed, Apr 06, 2011 at 11:31:31AM -0500, W. Michael Petullo wrote:
> >>>> First, what is the status of Xenoprof? The latest patch is against 0.9.5,
> >>>> but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
> >>>> maintained?
> 
> >>> There is a crufty pv_ops patch that I forward ported to 2.6.32 in this tree:
> >>> 
> >>> https://github.com/avsm/linux-2.6.32-xen-oprofile
> 
> >> So, is it true that I need to 1) use this patch or 2) use a non-PV
> >> Ops Dom0? I thought 2.6.32 was already non-PV Ops.
>  
> > I don't understand the question. The above tree is a pv_ops kernel,
> > with additional patches applied so it can be a full Xen dom0 (including
> > netback, etc).  I'm only sporadically updating it as I need to, so you
> > probably just want the oprofile patch [1] if you want to apply it to
> > some other kernel.
> 
> > https://github.com/avsm/linux-2.6.32-xen-oprofile/commit/4df4780e638d14249b7aa4005511218a9183c324
> 
> Thanks, Anil. I was able to get your patch to work. If anyone is
> interested in what I did, please see:
> 
> 	https://bugzilla.redhat.com/show_bug.cgi?id=693596#c2
> 
> An a related note, would there be any interest in cleaning up this patch
> and moving it to 2.6.38 as a part of Google Summer of Code?

There would be interest in getting it cleaned up for 2.6.38.

I don't think it could be done under GSOC - it looks like it would
just take a week for it to be done.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Questions about OProfile
  2011-04-05 21:53     ` Anil Madhavapeddy
  2011-04-06 16:31       ` W. Michael Petullo
@ 2011-04-18 18:33       ` W. Michael Petullo
  2011-04-18 20:10         ` Konrad Rzeszutek Wilk
  1 sibling, 1 reply; 8+ messages in thread
From: W. Michael Petullo @ 2011-04-18 18:33 UTC (permalink / raw)
  To: Anil Madhavapeddy; +Cc: xen-devel

>>>> First, what is the status of Xenoprof? The latest patch is against 0.9.5,
>>>> but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
>>>> maintained?

>>> There is a crufty pv_ops patch that I forward ported to 2.6.32 in this tree:
>>> 
>>> https://github.com/avsm/linux-2.6.32-xen-oprofile

>> So, is it true that I need to 1) use this patch or 2) use a non-PV
>> Ops Dom0? I thought 2.6.32 was already non-PV Ops.
 
> I don't understand the question. The above tree is a pv_ops kernel,
> with additional patches applied so it can be a full Xen dom0 (including
> netback, etc).  I'm only sporadically updating it as I need to, so you
> probably just want the oprofile patch [1] if you want to apply it to
> some other kernel.
> 
> https://github.com/avsm/linux-2.6.32-xen-oprofile/commit/4df4780e638d14249b7aa4005511218a9183c324

I ported Anil's patch to Linux 2.6.38. The result is available at:

	http://www.flyn.org/patches/linux-2.6.38-xen-passive-oprofile/linux-2.6.38-xen-passive-oprofile.patch.gz

With this patch applied to Linux 2.6.38 (along with various orthagonal Xen
patches), I can perform passive profiling on an unprivileged Xen domain.

-- 
Mike

:wq

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Questions about OProfile
  2011-04-18 18:33       ` W. Michael Petullo
@ 2011-04-18 20:10         ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-04-18 20:10 UTC (permalink / raw)
  To: W. Michael Petullo; +Cc: xen-devel, Anil Madhavapeddy

On Mon, Apr 18, 2011 at 01:33:59PM -0500, W. Michael Petullo wrote:
> >>>> First, what is the status of Xenoprof? The latest patch is against 0.9.5,
> >>>> but OProfile 0.9.6 is about 16 months old. Is Xenoprof actively
> >>>> maintained?
> 
> >>> There is a crufty pv_ops patch that I forward ported to 2.6.32 in this tree:
> >>> 
> >>> https://github.com/avsm/linux-2.6.32-xen-oprofile
> 
> >> So, is it true that I need to 1) use this patch or 2) use a non-PV
> >> Ops Dom0? I thought 2.6.32 was already non-PV Ops.
>  
> > I don't understand the question. The above tree is a pv_ops kernel,
> > with additional patches applied so it can be a full Xen dom0 (including
> > netback, etc).  I'm only sporadically updating it as I need to, so you
> > probably just want the oprofile patch [1] if you want to apply it to
> > some other kernel.
> > 
> > https://github.com/avsm/linux-2.6.32-xen-oprofile/commit/4df4780e638d14249b7aa4005511218a9183c324
> 
> I ported Anil's patch to Linux 2.6.38. The result is available at:
> 
> 	http://www.flyn.org/patches/linux-2.6.38-xen-passive-oprofile/linux-2.6.38-xen-passive-oprofile.patch.gz
> 
> With this patch applied to Linux 2.6.38 (along with various orthagonal Xen
> patches), I can perform passive profiling on an unprivileged Xen domain.

Woot! Awesome. For fun I tried to stick on 2.6.39, but got this:

 patch -p1 --dry-run < ~/linux-2.6.38-xen-passive-oprofile.patch 
patching file arch/x86/include/asm/xen/hypercall.h
Hunk #1 succeeded at 447 (offset 7 lines).
patching file arch/x86/oprofile/Makefile
patching file arch/x86/oprofile/xenoprof.c
patching file arch/x86/xen/mmu.c
Hunk #1 succeeded at 2349 (offset 55 lines).
Hunk #2 succeeded at 2381 (offset 55 lines).
Hunk #3 succeeded at 2403 with fuzz 1 (offset 55 lines).
patching file drivers/oprofile/buffer_sync.c
patching file drivers/oprofile/cpu_buffer.c
Hunk #5 FAILED at 259.
Hunk #6 FAILED at 275.
Hunk #7 FAILED at 408.
Hunk #8 succeeded at 448 (offset 10 lines).
3 out of 8 hunks FAILED -- saving rejects to file drivers/oprofile/cpu_buffer.c.rej
patching file drivers/oprofile/cpu_buffer.h
patching file drivers/oprofile/event_buffer.h
patching file drivers/oprofile/oprof.c
patching file drivers/oprofile/oprof.h
patching file drivers/oprofile/oprofile_files.c
patching file drivers/xen/xenoprof/xenoprofile.c
patching file include/linux/oprofile.h
Hunk #4 succeeded at 130 (offset 7 lines).
patching file include/xen/interface/xen.h
patching file include/xen/interface/xenoprof.h
patching file include/xen/xenoprof.h
patching file include/xen/xen-ops.h


And looking at the code it would require some little help in cpu_buffer
depatment.

It definitly has a lot of #ifdef CONFIG_XEN in it.. you wouldn't be
by any chance signing up for also trying to upstream it?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-18 20:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 17:03 Questions about OProfile W. Michael Petullo
2011-04-05 17:49 ` Anil Madhavapeddy
2011-04-05 21:45   ` W. Michael Petullo
2011-04-05 21:53     ` Anil Madhavapeddy
2011-04-06 16:31       ` W. Michael Petullo
2011-04-11 14:22         ` Konrad Rzeszutek Wilk
2011-04-18 18:33       ` W. Michael Petullo
2011-04-18 20:10         ` Konrad Rzeszutek Wilk

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.