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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.43.130.137 with SMTP id hm9mr11987403icc.24.1432835013489; Thu, 28 May 2015 10:43:33 -0700 (PDT) X-Received: by 10.140.37.129 with SMTP id r1mr70586qgr.18.1432835013361; Thu, 28 May 2015 10:43:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!m20no788266iga.0!news-out.google.com!k20ni44986qgd.0!nntp.google.com!z60no4324044qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 28 May 2015 10:43:33 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.237.62.132; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 105.237.62.132 References: <9ad1fcdc-cdf9-4ff0-aa7e-051d53b6736a@googlegroups.com> <7d56e720-5e91-4950-b4ae-29d7ddbdc11a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2e388144-8941-41a6-a8aa-447a798006d8@googlegroups.com> Subject: Re: longest path through a task From: jan.de.kruyf@gmail.com Injection-Date: Thu, 28 May 2015 17:43:33 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26035 Date: 2015-05-28T10:43:33-07:00 List-Id: On Thursday, May 28, 2015 at 6:37:28 PM UTC+2, Simon Wright wrote: >=20 > > I dumped the multithread stuff and made a single-thread / multitask > > runtime (slow in Ada unfortunately, but not as slow as multi-threading > > and interrupts. The Ravenscar runtime tries to be everything for > > everybody). >=20 > Just did some measurements (clumsily) using the Cortex-M4 counter as in > [1], and from entering the Ada handler to the triggered task starting to > execute averaged at 1200 cycles (6.7 us) with -Og, 1070 cycles (5.9 us) > with -O2. There is some code in the C handler to redirect to the Ada > handler: see [2], starting at line 236. >=20 > I wrote the C handling using weak symbols, so there's no reason (that I > can see) why an interrupt that needed better performance shouldn't hook > in directly, avoiding the Ada RTS; not so obvious how it would then > communicate with the rest of the code. >=20 > [1] http://stackoverflow.com/a/19124472 > [2] > https://sourceforge.net/p/stm32f4-gnat-rts/code/ci/default/tree/stm32f429= i-disco-rtos/src/stm32f4xx_it.c I lost you a bit here Simon, your thinking is way ahead of your fingers :) = I guess. or I am not familiar with your terminology. (more than likely)=20 Is this interrupt latency? or software interrupt latency?=20 Are you running multi threaded? are you triggering a task in this thread to= run in that thread?=20 Is this including your C runtime? Sorry to be so inquisitive, but I like to understand even though I have a p= ea brain. In the mean time I am having fun digesting Bruce's books' algorithms and tr= ying to see how to apply them. I will have to go back to the Corti thesis I= think, but it will not be as easy as what he did, since he could hack the = compiler with relative ease (a one floppy compiler). I will probably end up= entering code twice, in some reduced form to extract the longest path. Thanks for your guys help. j.