From: <le...@am...> - 2004-01-30 20:16:23
|
The event 0x76 was not listed in the public event list in the Athlon or AMD4 documents, but it had been approved to add event 0x76 to public event list. That's why Jason Yeh informed Oprofile. Event 0x76 works exactly as its name -- CPU_CLK_UNHALTED. Here is the test I did today. 1) Set PCE bit of CR4 on and clear TSD bit of CR4 in order to use RDPMC at any privilege level. 2) Set performance counter 0 to 0x004B0076 3) Run some programs to consume 100% CPU or (CPUs) 3) Write a program to log time stamp counter and performance counter on every 100 ms. Here are results: On Athlon (1.33G): Time Stamp, PCM0(0x004B0076), Delta TimeStamp, delta PCM0 1043646085192422, 3754993337315, 133765688, 133765688 1043646218958266, 3755127103159, 133765844, 133765844 1043646352721706, 3755260866599, 133763440, 133763440 1043646486488187, 3755394633080, 133766481, 133766481 1043646620256035, 3755528400928, 133767848, 133767848 On Athlon64 (2.2G) 4917953227214, 4566705044357, 220674653, 220674653 4918173900700, 4566925717843, 220673486, 220673486 4918394581523, 4567146398666, 220680823, 220680823 4918615249720, 4567367066863, 220668197, 220668197 4918835924193, 4567587741336, 220674473, 220674473 On Melody ( 1972936720800, 401929609692, 140659040, 139291498 1973077352725, 402070241617, 140631925, 140631925 1973218006782, 402210122346, 140654057, 139880729 1973358641699, 402350757263, 140634917, 140634917 1973499314133, 402491429697, 140672434, 140672434 Those data shows that event 0x76 works very consistently right. Oprofile setup the event count to trigger next sample by overflow. AMD CodeAnalyst performance analyzer is doing the same thing on Windows. And CPU_CLK_UNHALTED works right. AMD CodeAnalyst is available at http://www.developwithamd.com/appPartnerProg/codeanalyst/home/index.cfm?action=home. William Cohen, attachment includes public events for AMD Athlon and Athlon64/Opteron. Would you please add them into Red Hat Oprofile distribution? Thanks you for your time. Lei Yu -----Original Message----- From: opr...@li... [mailto:opr...@li...] Sent: Wednesday, January 28, 2004 11:44 PM To: opr...@li... Subject: oprofile-list digest, Vol 1 #632 - 2 msgs Send oprofile-list mailing list submissions to opr...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/oprofile-list or, via email, send a message with subject or body 'help' to opr...@li... You can reach the person managing the list at opr...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of oprofile-list digest..." Today's Topics: 1. Re: number of samples collected doesn't seem right... (William Cohen) 2. Re: number of samples collected doesn't seem right... (Philippe Elie) --__--__-- Message: 1 Date: Wed, 28 Jan 2004 14:21:24 -0500 From: William Cohen <wc...@nc...> To: William Cohen <wc...@nc...> CC: Steven Luk <ren...@ho...>, opr...@li... Subject: Re: number of samples collected doesn't seem right... William Cohen wrote: > Steven Luk wrote: > >> Just an update that I reboot with idle=poll and redo the test, but the >> result is still the same. >> And there is no "poll_idle" in the kernel profile. >> >> If I make my system only 50% busy, I will get some "poll_idle" in the >> kernel profile. But the total sample is still around 1600, and the >> number of samples for "poll_idle" is far below half of the total >> number of samples. >> >> CPU: Hammer, speed 2191.12 MHz (estimated) >> Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a >> unit mask of 0x00 (No unit mask) count 22000000 >> CPU_CLK_UNHALT...| >> samples| %| >> ------------------ >> 1401 87.3441 eatcpu >> 202 12.5935 vmlinux >> 1 0.0623 bash >> >> CPU: Hammer, speed 2191.12 MHz (estimated) >> Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a >> unit mask of 0x00 (No unit mask) count 22000000 >> samples % symbol name >> 201 99.5050 poll_idle >> 1 0.4950 smp_apic_timer_interrupt >> >> Cheers, >> Steven > > > Doesn't the Opteron have the ability to lower the processor clock speed > to save power? Could the clock speed lower than 2.2GHz? One other thought along these lines is some processors do throttling when the processor reaches a certain temperature. The clock is speed is lowered to slow the processor and avoid overheating (e.g. Pentium 4). According to some of the AMD documentation the AMD/Opterons can do this too. Is there some way to check the CPU temperatures? Maybe check the BIOS to see whether there is power management enabled. -Will > > Maybe samples are getting lost. Take a look at the files "/dev/oprofile" > > Another possibility is that not all of the samples are getting flushed > out when you are looking at the samples. Maybe the "opcontrol --dump" is > not writing everything out. > > -Will > >> >>> From: William Cohen <wc...@nc...> >>> To: Steven Luk <ren...@ho...> >>> CC: opr...@li... >>> Subject: Re: number of samples collected doesn't seem right... >>> Date: Wed, 28 Jan 2004 11:13:21 -0500 >>> >>> Steven Luk wrote: >>> >>>> Hello, All. >>>> >>>> On my 2way 2.2GHz AMD64 system. The number of samples I collected >>>> for CPU_CLK_UNHALTED doesn't seem right. >>>> >>>> I am using count 22,000,000, and the machine is 100% busy (user >>>> CPU). So I expect about 100 samples per second per CPU, and that >>>> means 200 samples per second for my 2way. But for a 10-second >>>> interval I got only 1630 samples, and for a 20-second interval I got >>>> only 2633 samples. >>>> >>>> Machine is a 2way AMD64 @ 2.2GHz, 2.4.21, oprofile 0.7.1 >>>> >>>> Is the way I calculate the number of expected samples correct? Why I >>>> am not seeing about 2000 samples for 10-second interval? >>> >>> >>> >>> How did you determine that both CPU are busy? If one CPU is kept busy >>> all the time and the other CPU is idle part of the time that could >>> explain the missing 370 samples for the 10 second run and 1367 >>> samples missing from the 20 second run. The CPU_CLK_UNHALTED only >>> counts cycles when the processor is unhalted. Most kernels are built >>> to use halt in idle process to reduce the amount of power consumed by >>> the processor. >>> >>> -Will >>> >>>> >>>> Thanks in advance! >>>> Steven >>>> >>>> ------- >>>> Using 2.4 OProfile kernel interface. >>>> Using log file /var/lib/oprofile/oprofiled.log >>>> Daemon started. >>>> Profiler running. >>>> Signalling daemon... done >>>> Killing daemon. >>>> Steven Debug: It took 1 seconds to kill the Daemon >>>> CPU: Hammer, speed 2191.14 MHz (estimated) >>>> Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with >>>> a unit mask of 0x00 (No unit mask) count 22000000 >>>> CPU_CLK_UNHALT...| >>>> samples| %| >>>> ------------------ >>>> 1628 99.8773 eatcpu >>>> 1 0.0613 ld-2.2.5.so >>>> 1 0.0613 libc.so.6 >>>> >>>> _________________________________________________________________ >>>> MSN 8 with e-mail virus protection service: 2 months FREE* >>>> http://join.msn.com/?page=features/virus&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca >>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> The SF.Net email is sponsored by EclipseCon 2004 >>>> Premiere Conference on Open Tools Development and Integration >>>> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >>>> http://www.eclipsecon.org/osdn >>>> _______________________________________________ >>>> oprofile-list mailing list >>>> opr...@li... >>>> https://lists.sourceforge.net/lists/listinfo/oprofile-list >>>> >>> >> >> _________________________________________________________________ >> Tired of spam? Get advanced junk mail protection with MSN 8. >> http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca >> >> >> > > --__--__-- Message: 2 Date: Wed, 28 Jan 2004 21:33:35 +0000 From: Philippe Elie <ph...@wa...> To: William Cohen <wc...@nc...> Cc: John Levon <le...@mo...>, Steven Luk <ren...@ho...>, opr...@li..., jas...@am... Subject: Re: number of samples collected doesn't seem right... On Wed, 28 Jan 2004 at 14:11 +0000, William Cohen wrote: > >yeps, but that the second time someone report problem with this event. The > >first was puetzk (unsure if it was not an Athlon) and I check with him he > >used > >oprofile correctly. This report look like ok too. The documentations I used > >are the latest so ... > > The CPU_CLK_UNHALTED seemed to work for me in the past on an AMD64 ^^^^^^ did you measure reported nr of samples match unhalted time ? It's difficult to see a problem w/o looking it with a specific test case. > machine. Jason Yeh from AMD sent mail adding it, so it would seem likely > that this event works. I would really hate to remove it even if some > processors have problems with it. It is an extremely useful event. Agreed but from the description of the box it look like a very recent AMD64 processor... I digged a bit on the net: this event was documented in #22007.pdf revision E (no longer available) then removed from AMD documentation. This event has never been documented in AMD64 documentation afaics (there is other events in the same case some of them seems supported in K8). I've a lot of doubts if CPU_CLK_UNHALTED is reliable. If we continue to support them we must document these as officially unsupported and not reliable. > Maybe there is an entry in the specfication update that could indicate > which versions this works on. However, I didn't see anything at: There is one only for Athlon model 10 #27532.pdf item 18. regards, Phil --__--__-- _______________________________________________ oprofile-list mailing list opr...@li... https://lists.sourceforge.net/lists/listinfo/oprofile-list End of oprofile-list Digest |