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: a07f3367d7,36a9f38dd6514fc8 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!u-picardie.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: gnat: Execution_Time is not supported in this configuration Date: Fri, 4 Dec 2009 20:59:25 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <5e5d6fb5-e719-4195-925c-d1286699393d@f16g2000yqm.googlegroups.com> <1wjhklygzok25.t79koxbbtlcj$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1259981967 24247 69.95.181.76 (5 Dec 2009 02:59:27 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 5 Dec 2009 02:59:27 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:8312 Date: 2009-12-04T20:59:25-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1wjhklygzok25.t79koxbbtlcj$.dlg@40tude.net... ... > This package heavily depends on the OS services at least when the tasks > are > mapped onto the OS scheduling items (like threads). > > As far as I know it is impossible to implement it reasonably under > Windows, > because the corresponding service (used by the Task Manager too) counts > time quants instead of the time. This causes a massive systematic error if > tasks are switched before they consume their quants. I.e. *always* when > you > do I/O or communicate to other tasks. The bottom line, under Windows > Ada.Execution_Time can be used only for tasks that do lengthy computations > interrupted by only by the scheduler, so that all counted quants were > consumed and no time were spent in uncounted quants. Obviously this depends on the purpose. For many profiling tasks, the Windows implementation is just fine. The quants seem to be short enough that most tasks run long enough to be counted. (And I/O has probably already be reduced to the minimum before even applying a profiler, if not, you're probably profiling the I/O first, not the CPU.) But I would have to agree that it isn't all that real-time. In any case, thanks for the clear explanation of the limitations of the Windows services. I'm sure that I'll run into them sooner or later and I'll hopefully remember your explanation. Randy.