From mboxrd@z Thu Jan 1 00:00:00 1970 References: From: Philippe Gerum Subject: Re: Track down in-band switches Date: Wed, 08 Jun 2022 08:50:36 +0200 In-reply-to: Message-ID: <87o7z3ws8m.fsf@xenomai.org> MIME-Version: 1.0 Content-Type: text/plain List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Russell Johnson Cc: xenomai@xenomai.org Russell Johnson via Xenomai writes: > Hello, > > > > I am currently working on porting my realtime threads in my app to EVL. I am > using "evl ps -l" to track whether or not there are any in-band switches on > my EVL threads. Is there any recommended tool or method for tracking down > what specifically is causing the in-band switches on an EVL thread? > There are two additional options provided by the health monitoring interface [1], both enabled with [2]: - using the legacy signal-based method (T_HMSIG), which sends SIGDEBUG (a Xenomai alias to SIGXCPU) to the thread which switches in-band, with the cause for switch available from the siginfo data. - using the 'observable' interface of any EVL thread (T_HMOBS) to receive message-based notifications instead of signals. In this case, a thread can observe other threads, i.e. receive those notifications. [4] is a simple test which illustrates how to use this interface. [1] https://evlproject.org/core/user-api/thread/#health-monitoring [2] https://evlproject.org/core/user-api/thread/#evl_set_thread_mode [3] https://evlproject.org/core/user-api/observable/#observable-thread [4] https://source.denx.de/Xenomai/xenomai4/libevl/-/blob/master/tests/observable-hm.c -- Philippe.