Article View: comp.arch
Article #23445Re: Win95 performance counter interface?
From: Todd West
Date: Sun, 29 Nov 1998 00:00
Date: Sun, 29 Nov 1998 00:00
36 lines
2884 bytes
2884 bytes
Paul Hsieh <qed@pobox.com> wrote: >of. Nevertheless, if you have a good one it should document the CPUID >instruction which you can test function 1, bit 4 of edx. That's how you >know whether or not your CPU supports the TSC register. > >RDTSC operates in all rings; It does not run in 16 bit v86 mode. > >You don't have to guess. Use the CPUID instruction above -- it tells you >all the additional features that your processor supports. I'm suprised you didn't tell me how to check for cpuid support as well, or mention any of the ways to figure out whether or not a program is running on a processor that can acutally execute a cpuid check. I'll admit to being lazy and usually assuming my code is running on something more modern than a 386, though that's not a wise assumption in some markets. Do you really think I'm so stupid I don't know all this already? What I do lack is the resources to go out and do characterization that should be done by x86 clone manufacturers anyway; if I download a K6 instruction set listing---from AMD's website, of all places---and discover rdtsc is *not* listed, it's only sensible to assume no K6 has rdtsc and code accordingly. >> FWIW, I've also had invalid opcode faults on rdtsc on an early K6, >Impossible. Unless you are in 16 bit v86 mode (ask Intel about that.) No, it was not 16 bit v86 mode: wake up, Paul. Nothing's perfect, and it's not like I had a K6 ICE and the time to see what was going on, particularly when AMD's documentation gave no indication the processor did support rdtsc (that was a little over a year ago; perhaps they've fixed this by now, but I've moved on to other things). Todd -- Anti-spam boggling in effect. Edit reply-to address before sending mail.
Technical Details
Message-ID:
<73sf38$18p$1@winter.news.rcn.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<72kj98$lpj$1@autumn.news.rcn.net> <73q7r3$c63$4@winter.news.rcn.net> <73ro0u$j8t$1@winter.news.rcn.net> <73sam6$s06$1@winter.news.rcn.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9d87,80c509bc716c6415 X-Google-Attributes: gidf9d87,public X-Google-Thread: 102b75,80c509bc716c6415 X-Google-Attributes: gid102b75,public X-Google-Thread: 114917,80c509bc716c6415 X-Google-Attributes: gid114917,public X-Google-Thread: 110292,80c509bc716c6415 X-Google-Attributes: gid110292,public From: SpamYourselFtwest@agora.rdrop.kom (Todd West) Subject: Re: Win95 performance counter interface? Date: 1998/11/29 Message-ID: <73sf38$18p$1@winter.news.rcn.net> X-Deja-AN: 416875131 Approved: <johnfine@erols.com> References: <72kj98$lpj$1@autumn.news.rcn.net> <73q7r3$c63$4@winter.news.rcn.net> <73ro0u$j8t$1@winter.news.rcn.net> <73sam6$s06$1@winter.news.rcn.net> X-Mozilla-Status: 0801 X-Complaints-To: abuse@rcn.com X-Trace: +cV7hWyzo7IAfDIpJrB6VBK51+8j5h1K7woE1RJjAGc= Organization: RainDrop Laboratories/Agora(sm), Portland, Oregon Reply-To: SpamYourselFtwest@agora.rdrop.kom (Todd West) NNTP-Posting-Date: 29 Nov 1998 21:42:00 GMT Newsgroups: comp.arch,comp.lang.asm.x86,comp.sys.intel,intel.microprocessors.pentium_ii