+ // Use a full-blown adaptive mutex because:
+ // - There is only one ProfilerDatabase per VM. The size overhead of the system's
+ // mutex is negligible if you only have one of them.
+ // - It's locked infrequently - once per bytecode generation, compilation, and
+ // code block collection - so the fact that the fast path still requires a
+ // function call is neglible.
+ // - It tends to be held for a while. Currently, we hold it while generating
+ // Profiler::Bytecodes for a CodeBlock. That's uncommon and shouldn't affect
+ // performance, but if we did have contention, we would want a sensible,
+ // power-aware backoff. An adaptive mutex will do this as a matter of course,
+ // but a spinlock won't.
+ typedef Mutex Lock;
+ typedef MutexLocker Locker;
+