How can I force OProfile / Xenoprof to use event counters when working on EC2?

I am writing an EC2 clustering profiling tool that is designed to collect data by running OProfile for each instance. Ultimately, I would like to combine the XML output generated by opreport and parse it later.

Right now, I'm stuck in getting OProfile to view hardware events - all I can do is create profiles in timer interrupt mode. I have a feeling that this is due to the fact that EC2 instances work in a virtualized environment where OProfile cannot see hardware events.

I studied this hunch a bit and came up with Xenoprof as a possible solution, but there is very limited documentation on how to run it and work with EC2.

If someone managed to launch Xenoprof on EC2 (and I know that there should be some success, because there are several articles about this), could you tell me what is going wrong?

When I run yum install oprofile

and then the person is opcontrol

in the instance, I see that there are options for xen, which I think means that Xenoprof should be installed. I just don’t know what to do to get hardware events as my samples.

Any advice would be highly appreciated! Thanks.

+4
source share
1 answer

Following https://bugzilla.redhat.com/show_bug.cgi?id=582570 I was able to get an oprofile to run on EC2:

 opcontrol --deinit modprobe oprofile timer=1 opcontrol --reset opcontrol --no-vmlinux opcontrol --start 
+3
source

Source: https://habr.com/ru/post/1379408/


All Articles