简体   繁体   English

如何测试中断延迟?

[英]How to test Interrupt Latency?

Windows Embedded Compact 7. Windows Embedded Compact 7。

Is there a way to test interrupt latency time from user space? 有没有一种方法可以从用户空间测试中断延迟时间?

Are there any tools provided as part of platform builder? 平台构建器是否提供任何工具?

I also saw a program called Intrtime.exe - but no examples on how to use it. 我还看到了一个名为Intrtime.exe的程序-但没有有关如何使用它的示例。

How does one test the interrupt latency time? 如何测试中断等待时间?

Reference for Intrtime.exe but how do I implement it? Intrtime.exe的参考,但如何实现?
http://www.ece.ufrgs.br/~cpereira/temporeal_pos/www/WindowsCE2RT.htm http://www.ece.ufrgs.br/~cpereira/temporeal_pos/www/WindowsCE2RT.htm

EDIT 编辑
Also found: 还发现:

ILTiming.exe Real-Time Measurement Tool (Compact 2013) ILTiming.exe实时测量工具(Compact 2013)

http://msdn.microsoft.com/en-us/library/ee483144.aspx http://msdn.microsoft.com/en-us/library/ee483144.aspx

This really is a test that requires hardware, and there are a couple "latencies" you might measure. 这确实是一项需要硬件的测试,您可能需要测量几个“延迟”。 Once is the time from the interrupt signal to when the driver ISR reacts and the second is from when the interrupt occurs to when an IST reacts. 从中断信号到驱动程序ISR反应的时间是一次,从中断发生到IST反应的时间是第二个时间。

I did this back in the CE 3.0/CE 4.0 days by attaching a signal generator to an interruptable input an then having an ISR pulse a second input and an IST pulse a third input when they received the interrupt. 在CE 3.0 / CE 4.0的日子里,我通过将信号发生器连接到可中断输入上来实现了这一点,然后在接收到中断时将ISR脉冲作为第二输入,将IST脉冲作为第三输入。 I hooked a scope up to the input and outputs and used it to measure time between the input signal and output signals to get not just latency, but also jitter. 我将示波器连接到输入和输出,并用它来测量输入信号和输出信号之间的时间,以不仅获得延迟,而且获得抖动。 You could easily add a 4th line for CE 7 so you could check an IST in user space and an IST in kernel space. 您可以轻松地为CE 7添加第4行,以便可以检查用户空间中的IST和内核空间中的IST。 I'd definitely be interested to see the results. 我肯定会对看到结果感兴趣。

I don't think you can effectively measure this with software running on the platform, as you get into the problem of the code trying to do the measurement affecting the results. 我认为您无法使用在平台上运行的软件来有效地进行测量,因为您遇到了尝试进行会影响结果的测量的代码问题。 You're also talking time way, way below the system tick resolution so the scheduler is going to be problematic as well. 您还说的是时间方式,低于系统时钟分辨率,因此调度程序也会出现问题。 CeLog might be able to get you an idea on these times, but getting it set up and running is probably more work than just hooking up a scope. CeLog也许可以在这些时候为您提供一个想法,但是设置和运行它可能比挂接示波器还需要做更多的工作。

What is usually meant by interrupt latency is the time between an interrupt source asserting the interrupt line and a thread (sometimes in user-space) being scheduled and then executing as a result. 中断等待时间通常是指中断源声明中断线与被调度的线程(有时在用户空间)然后执行结果之间的时间。

Unless your CPU has some accurate way of time-stamping interrupt events as they arrive at the CPU (rather than when an ISR runs), the only truly accurate measurement is one done externally - by measuring the time between a the interrupt line being asserted and some observable signal that the thread responding to the interrupt can control. 除非您的CPU在中断事件到达CPU时有某种准确的时间戳记(而不是在运行ISR时),否则,唯一真正准确的测量是在外部进行-通过测量断言和中断之间的时间。响应中断的线程可以控制的一些可观察到的信号。 A DSO or logic analyser is usually used for this purpose. 为此通常使用DSO或逻辑分析仪。

Software techniques usually rely on storing an accurate time-stamp at the earliest opportunity in an ISR. 软件技术通常依赖于在ISR中尽早存储准确的时间戳。 If you're certain the time between interrupt line becoming asserted and the ISR running is negligible, this might be valid. 如果您确定中断线被置为与ISR运行之间的时间可以忽略不计,那么这可能是有效的。 If, on the other hand, disabling of interrupts is being used to control concurrency, or interrupts are nested, you probably want to be measuring this as well. 另一方面,如果使用禁用中断来控制并发,或者嵌套了中断,则您可能也想对此进行衡量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM