Replies: 1 comment
-
I wanted to attach the tracelog image but I could not able to attach. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Team,
I am using DLT_LOG() api my application. And DLT_LOG() api is taking much longer time to return it is taking around 1.5 sec to return. This leads the issue which has performance requirement.
Environment:
Platform: SA8155 (Hypervisor QNX & Android)
OS: QNX
This is happening at around 20sec since boot up.
I have verified this after capturing the time before and after DLT_LOG() in my application.
Code Snippet:
clock_gettime(CLOCK_MONOTONIC, &tspec);
DLT_LOG();
clock_gettime(CLOCK_MONOTONIC, &tspec);
Also, I have added logs in dlt user library and found that dlt_initialize_socket_connection() is taking much time to finish.
https://github.com/COVESA/dlt-daemon/blob/master/src/lib/dlt_user.c#L284
After further analysis I have found that Semaphore is locked under dlt_initialize_socket_connection() and after processing ~1.5 sec it unlock. Mean while when DLT_LOG() is called then it is waiting for Semaphore unlock and delay can be seen at DLT_LOG() api.
Here's the trace info,
Thread 2 (housekeeper thread) is calling dlt_initialize_socket_connection() and semaphore lock is applied.
Thread 11 is calling DLT_LOG() and waiting for dlt_initialize_socket_connection() semaphore unlock.
Could you please share your feedback that how to change the semaphore in order to avoid this issue?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions