-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Mono implementation of this method just returns `pthread_self` that is the opaque thread ID and that is very cheap to get (it just returns thread local static):
runtime/src/mono/mono/eventpipe/ep-rt-mono.h
Line 962 in 2b122d3
| return mono_native_thread_id_get (); |
| return pthread_self (); |
Similarly, the CoreCLR implementation built on top of Win32 PAL emulator is fairly cheap.
PalGetCurrentThreadIdForLogging is implemented as a raw syscall(SYS_gettid) that will be at least 100x more expensive than pthread_self.
This smells like a pretty significant performance issue.
Originally posted by @jkotas in #86226 (comment)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status