From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e81fd3a32a1cacd2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Does Ada tasking profit from multi-core cpus? Date: Wed, 7 Mar 2007 23:21:04 -0600 Organization: Jacob's private Usenet server Message-ID: References: <1170071840.010200.85210@s48g2000cws.googlegroups.com> <1173089302.125025.31370@t69g2000cwt.googlegroups.com> <0dmdnZIAd76ZpXPYnZ2dnUVZ_uCinZ2d@comcast.com> <1lq9zxgrnvfjx$.17ip3w3ei4xdb.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1173334461 10723 69.95.181.76 (8 Mar 2007 06:14:21 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 8 Mar 2007 06:14:21 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:14416 Date: 2007-03-07T23:21:04-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1lq9zxgrnvfjx$.17ip3w3ei4xdb.dlg@40tude.net... ... > Just a side note, the Windows API GetThreadTimes (which the viewer > apparently uses) is corrupted. It counts complete time quants rather than > the performance counter ticks. So, potentially you could observe 1% under > factual 99% CPU load. The bug should appear for threads performing much > synchronization, because they leave the processor before the current quant > expiration. I wouldn't call it "corrupted"; it's just not very accurate (given that it can only register time with a granularity of 0.01 sec). I don't think there is any other way to find out CPU use, though, as the performance counter provides wall time and thus isn't very useful to find out how much a thread is running. (I've tried to figure out how to implement Ada.Execution_Time on Windows...) Randy.