AMD Processors
Decrease font size
Increase font size
Topic Title: How to interpret hardware performance counter result
Topic Summary:
Created On: 05/24/2010 12:57 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 05/24/2010 12:57 PM
User is offline View Users Profile Print this message

Author Icon
huan
Newbie

Posts: 1
Joined: 05/24/2010

Hi,

I am trying to use the hardware performance counter. As a first step, I am counting the unhalted processor cycles as a sanity check. I set PerfCtr0 (C001_0004h) to 0x430076, then read the result back every second and compute the difference from the previous read.

When processor is 100% busy, I got a read of something like 4,311,488,287. At the same time, I am also reading the time stamp counter (rdtsc), and I got a read of something like 2,917,032,298 for the same 1 sec period. Why do not the two numbers match?

/proc/cpuinfo shows:

processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 4
model name : Quad-Core AMD Opteron(tm) Processor 8389
stepping : 2
cpu MHz : 2913.567
cache size : 512 KB
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr
sse sse2 syscall mmxext fxsr_opt rdtscp lm 3dnowext 3dnow constant_tsc up rep_good tsc_reliable nonstop_t
sc pni cx16 popcnt hypervisor lahf_lm extapic abm sse4a misalignsse 3dnowprefetch
bogomips : 5826.85
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

The time stamp counter seems to match the clock frequency. So the question is why there are more unhalted cycles? Does it mean the system is overclocked? Am I doing something wrong?

BTW, I have no physical access to the server, which is located in a server room. Any help is greatly appreciated.

-Huan
 05/28/2010 01:53 AM
User is offline View Users Profile Print this message

Author Icon
explore
Newbie

Posts: 4
Joined: 05/25/2010

I guess that the overhead is different betwwen read PMC and rdstc.
Statistics
112018 users are registered to the AMD Processors forum.
There are currently 0 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2013 FuseTalk Inc. All rights reserved.



Contact AMD Terms and Conditions ©2007 Advanced Micro Devices, Inc. Privacy Trademark information