The functions tcache_get and tcache_put show up in profiles as they
are a critical part of the tcache code. Inline them to give tcache
a 16% performance gain. Since this improves multi-threaded cases
as well, it helps offset any potential performance loss due to adding
single-threaded fast paths.
* malloc/malloc.c (tcache_put): Inline.
(tcache_get): Inline.
+2017-10-17 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * malloc/malloc.c (tcache_put): Inline.
+ (tcache_get): Inline.
+
2017-10-17 Jordi Mallach <jordi@gnu.org>
Aurelien Jarno <aurelien@aurel32.net>
/* Caller must ensure that we know tc_idx is valid and there's room
for more chunks. */
-static void
+static __always_inline void
tcache_put (mchunkptr chunk, size_t tc_idx)
{
tcache_entry *e = (tcache_entry *) chunk2mem (chunk);
/* Caller must ensure that we know tc_idx is valid and there's
available chunks to remove. */
-static void *
+static __always_inline void *
tcache_get (size_t tc_idx)
{
tcache_entry *e = tcache->entries[tc_idx];