aboutsummaryrefslogtreecommitdiff
path: root/malloc/trace2dat
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2016-04-29 14:58:34 -0400
committerDJ Delorie <dj@delorie.com>2016-04-29 15:01:16 -0400
commit46b44370f430c1de1da835903b96c77a55ff1d63 (patch)
tree6d29bcc00e85789d7829f7a8ff1c3dbde0895660 /malloc/trace2dat
parent5bd0885c9ddf14ddb959742fcb0d4b2368d7b44f (diff)
downloadglibc-46b44370f430c1de1da835903b96c77a55ff1d63.tar.xz
glibc-46b44370f430c1de1da835903b96c77a55ff1d63.zip
changes to per-thread cache algorithms
Core algorithm changes: * Per-thread cache is refilled from existing fastbins and smallbins instead of always needing a bigger chunk. * Caches are linked, and cache is cleaned up when the thread exits (incomplete for now, needed framework for chunk scanner). * Fixes to mutex placement - needed to sync chunk headers across threads. Enabling the per-thread cache (tcache) gives about a 20-30% speedup at a 20-30% memory cost (due to fragmentation). Still working on that :-) Debugging helpers (temporary): * __malloc_scan_chunks() calls back to the app for each chunk in each heap. * _m_printf() helper for "safe" printing within malloc * Lots of calls to the above, commented out, in case you need them. * trace_run scans leftover chunks too.
Diffstat (limited to 'malloc/trace2dat')
-rwxr-xr-xmalloc/trace2dat2
1 files changed, 2 insertions, 0 deletions
diff --git a/malloc/trace2dat b/malloc/trace2dat
index 1d8029e295..d09ca6c1c3 100755
--- a/malloc/trace2dat
+++ b/malloc/trace2dat
@@ -5,6 +5,8 @@ $outfile = shift @ARGV;
$outfile = "trace2c.dat" unless $outfile;
+die("$outfile already exists") if -f $outfile;
+
# Arrays starting with c_ are data code to be emitted later