This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26.9000-589-ge4dd4ac

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  e4dd4ace56880d2f1064cd787e2bdb96ddacc3c4 (commit)
      from  8867c3c14b0005530d041215de8383a0fbf2c327 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------;a=commitdiff;h=e4dd4ace56880d2f1064cd787e2bdb96ddacc3c4

commit e4dd4ace56880d2f1064cd787e2bdb96ddacc3c4
Author: Wilco Dijkstra <>
Date:   Tue Oct 17 18:25:43 2017 +0100

    Inline tcache functions
    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.

diff --git a/ChangeLog b/ChangeLog
index 1bce8a4..8f47ecf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-17  Wilco Dijkstra  <>
+	* malloc/malloc.c (tcache_put): Inline.
+	(tcache_get): Inline.
 2017-10-17  Jordi Mallach  <>
 	Aurelien Jarno  <>
diff --git a/malloc/malloc.c b/malloc/malloc.c
index d3fcadd..302b34b 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2921,7 +2921,7 @@ static __thread tcache_perthread_struct *tcache = NULL;
 /* 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);
@@ -2933,7 +2933,7 @@ tcache_put (mchunkptr chunk, size_t tc_idx)
 /* 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];


Summary of changes:
 ChangeLog       |    5 +++++
 malloc/malloc.c |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

GNU C Library master sources

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]