g2gps opened a new issue, #10571:
URL: https://github.com/apache/nuttx/issues/10571

   I've been doing a bit of profiling or our applications lately using 
trace-compass and the corresponding `SCHED_INSTRUMENTATION_xx` profiling 
options. 
   
   During periods of heavy thread synchronization, I'm seeing ~1000 calls to 
`gettid()` over a 10 second period. I understand that knowing the thread ID of 
the calling task is required mutexs, but I'm looking at possible solutions to 
save or cache this value, as, if I understand correctly, the TID doesn't change 
once the process is created. 
   
   I have a proposed solution in the linked PR, which used TLS to store the 
value, when available. However, this approach seems a little bit off, and 
possible could be done in a better way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to