Add heterogenous lookup to Thread::custom_tls_
This avoids needing to allocate strings when performing lookups.
Test: ./test.py --host
Bug: 135266723
Change-Id: I4eb4d890816ed25199077ab017723078a531e09e
diff --git a/runtime/thread.h b/runtime/thread.h
index b63e39f..cd1227a 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -1883,7 +1883,8 @@
// Custom TLS field that can be used by plugins or the runtime. Should not be accessed directly by
// compiled code or entrypoints.
- SafeMap<std::string, std::unique_ptr<TLSData>> custom_tls_ GUARDED_BY(Locks::custom_tls_lock_);
+ SafeMap<std::string, std::unique_ptr<TLSData>, std::less<>> custom_tls_
+ GUARDED_BY(Locks::custom_tls_lock_);
#ifndef __BIONIC__
__attribute__((tls_model("initial-exec")))