Re: Help in removing Oprofile

Shiva M <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <CAEK0tff+bC4XcYZBqtr9ZPV=pxq=p81H6EmoEV1hNZF8Rsw81A@mail.gmail.com>
Hi Will, Michal,

Thanks a ton for your response, it saved lot of my work. After adding <cpu
mode='host-passthrough'/> to my vm xml and doing following :
virsh destroy testvm1
virsh undefine testvm1

virsh define testvm1.xml
virsh start testvm1

restart /etc/init.d/libvirtd-bin restart, solved my problem. Now I see
operf is working. Thanks again for your help.



Thanks,
Shiva


On Sat, Feb 4, 2017 at 1:23 AM, Michael Petlan <[email protected]> wrote:

> Hi Shiva,
>
> in order to enable PMU on a QEMU/KVM guest, do the following:
>
> 1) virsh edit YOUR_MACHINE_NAME
>
> 2) add the following snippet to the XML:
>   <cpu mode='host-passthrough'/>
>
> Of course, if you already have some different CPU setting there,
> just replace it by the mentioned one. The important thing there
> is the 'host-passthrough'.
>
> 3) restart libvirtd and the VM
>
> ...
>
> Then you should be able to use operf/ocount tools there.
>
> Also please note, that older versions of libvirt/qemu might not
> support it. I have qemu-kvm-1.5.3-126.el7_3.3.x86_64 and
> libvirt-2.0.0-10.el7_3.4.x86_64.
>
> Cheers,
> Michael
>
> On Fri, 3 Feb 2017, Shiva M wrote:
>
>> Hi Will,
>> Thank you and Sorry for delayed response. I have enabled
>> CONFIG_HAVE_PERF_EVENTS=y. I Forgot to mention, Oprofile I
>> am trying to bring up on KVM virtual machine.  If I build on physical
>> server, oprofile-1.0.0 is working fine.  And
>> I can connect to running process for profiling. But If I build
>> oprofle-1.0.0 on KVM VM, I see
>>
>> "Your kernel's Performance Events Subsystem does not support your
>> processor type.
>> Please use the opcontrol command instead of operf."
>>
>> Then I tried with Oprofile-0.9.9, I see opcontrol command works, I want
>> to connect to running process for profilng.
>>
>> Let me know if I am doing anything wrong. I saw opcontrol options, but I
>> couldn't see to connect to running
>> process.
>>
>> Thanks,
>> Shiva
>>
>>
>>
>>
>> On Thu, Feb 2, 2017 at 1:59 AM, William Cohen <[email protected]> wrote:
>>       On 02/01/2017 12:43 PM, Shiva M wrote:
>>       > Hi Will,
>>       >
>>       > I am using Oprofile 0.9.9.  I tried with Oprofile-1.0.0 but later
>> I found kernel CPU counters were
>>       not supported. Shall I try with Oprofile-0.9.7?. I did following to
>> build Oprofile
>>       >
>>       > Oprofile-0.9.9>./configure --enable-static
>> --with-kernel-support  --prefix=/home/shiva/usr
>>       >     sudo make
>>       >     make install
>>       >     DESTDIR="/home/shiva/user"
>>       >
>>       >
>>       > Thanks,
>>       > Shiva
>>
>>       Hi Shiva,
>>
>>       opcontrol was removed from oprofile-1.0.0, so the kernel will need
>> to be built with
>>       CONFIG_PERF_EVENTS=y in the .config file to use oprofile-1.0.0. You
>> might check to see if the kernel
>>       perf infrastructure works with command "perf stat true".  I have
>> used that in the past to determine
>>       whether the problem is in oprofile or in the kernel.  If it works
>> oprofile is the problem, if that perf
>>       command is broken then need to look at the kernel.  Is the kernel
>> built with the oprofile driver
>>       (CONFIG_OPROFILE=m?  If not opcontrol won't work.  Another thing to
>> keep in mind is that some newer
>>       processors might not be recognized by the oprofile driver.  I would
>> encourage you to use the oprofile
>>       perf interface with operf rather than the opcontrol interface.
>>
>>       When things fail it would be helpful to include the specific error
>> messages in the dicussion to better
>>       diagnose the reason for the failure.
>>
>>       -Will
>>
>>
>>
>>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.