gettid() system call volume with kernel mode.
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
I've been doing a bit of profiling of 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.
Contributor guide
Assessment
This issue has not been assessed yet.