Skip to contentSkip to conversation

perf stat -e cycles -p <pid> sleep 10

DISCUSSION Chris Freehill 2 participants 4 messages Nov 26, 2012 – Nov 27, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

Apologies if the answer to this is someplace I have not looked. I've searched this list and other sites/FAQ's.

I've noticed that command listed in the subject line always yields

<not counted> cycles

unless the target process is suspended. I have noticed this with a few different distributions. Is the fact that the target process has to be suspended at least once a known design limitation or would it be considered a bug?

Thank you for your help.

Chris

#1 lore raw

What kind of distributions you've tested?

In my case(ubuntu 11.04), it works correctly.

I suspect your machine's PMU status, wrong installation, or missing perf kernel module.

2012-11-27 오전 7:50, Chris Freehill 쓴 글:

Quoted 22 lines

Hi,

Apologies if the answer to this is someplace I have not looked. I've searched this list and other sites/FAQ's.

I've noticed that command listed in the subject line always yields

<not counted> cycles

unless the target process is suspended. I have noticed this with a few different distributions. Is the fact that the target process has to be suspended at least once a known design limitation or would it be considered a bug?

Thank you for your help.

Chris

--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 6 lines · Chulmin Kim <cmkim <at> core.kaist.ac.kr> writes:

What kind of distributions you've tested?

In my case(ubuntu 11.04), it works correctly.

I suspect your machine's PMU status, wrong installation, or missing perf kernel module.

Thank you for the reply.

I had tested on Ubuntu 12.04 and the Freescale Linux version (power arch-- P5020). Upon your response, I retested, and you are correct. It does work as expected on Ubuntu, so there must be an issue on the other version only.

I will investigate some of the leads you suggested. I am a newbie with perf and perf development, so the suggestions help.

Thanks again.

#3 lore raw

An update in case another newbie runs into this...this was user error.

I believe the reason I was seeing no events is that the processes (in the "failure" cases) I chose to monitor were not being allocated any time, so of course they generated no events. When I select the right processes, I get events.