All,
I am facing an issue I need to debug where after running some number of TAs, the OP-TEE kernel is no longer able to malloc() memory and can no longer load a TA. So, there seems to be a leak of some kind I need to debug. I'm using a crypto accelerator, and so there is most likely a bug in my crypto driver.
Is there any debug mechanism in OP-TEE I could use to get data or statistics about how much space is left on the heap? I've poked around some and don't see anything, but thought I would ask.
Thanks, Stuart
Hi Stuart,
On Thu, Oct 26, 2017 at 4:17 PM, Stuart Yoder stuart.yoder@arm.com wrote:
All,
I am facing an issue I need to debug where after running some number of TAs, the OP-TEE kernel is no longer able to malloc() memory and can no longer load a TA. So, there seems to be a leak of some kind I need to debug. I'm using a crypto accelerator, and so there is most likely a bug in my crypto driver.
Is there any debug mechanism in OP-TEE I could use to get data or statistics about how much space is left on the heap?
Yes, there is a pseudo-TA that reports some statistics about the OP-TEE kernel heap. Build with CFG_WITH_STATS=y to enable it. The client application is here: https://github.com/jforissier/tee-stats. Quite basic, but hopefully helpful.
[1] https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/pta/stats.c
On 10/26/17 9:47 AM, Jerome Forissier wrote:
Hi Stuart,
On Thu, Oct 26, 2017 at 4:17 PM, Stuart Yoder <stuart.yoder@arm.com mailto:stuart.yoder@arm.com> wrote:
All, I am facing an issue I need to debug where after running some number of TAs, the OP-TEE kernel is no longer able to malloc() memory and can no longer load a TA. So, there seems to be a leak of some kind I need to debug. I'm using a crypto accelerator, and so there is most likely a bug in my crypto driver. Is there any debug mechanism in OP-TEE I could use to get data or statistics about how much space is left on the heap?
Yes, there is a pseudo-TA that reports some statistics about the OP-TEE kernel heap. Build with CFG_WITH_STATS=y to enable it. The client application is here: https://github.com/jforissier/tee-stats. Quite basic, but hopefully helpful.
[1] https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/pta/stats.c
Thank you! ...will give this a try.
Stuat