Commit 63b584a
committed
llvm-project: link against jemalloc
The following symbols from musl's malloc-ng implementation were
appearing in a perf profile of a kernel build within the top 20 hottest
symbols by cycle count.
malloc-ng:
Samples: 589K of event 'cycles:ppu', Event count (approx.): 11053523397362
Overhead Shared Object Symbol
+ 1.57% clang [.] __libc_malloc_impl
0.69% clang [.] __libc_free
+ 0.65% clang [.] alloc_slot
+ 0.58% clang [.] get_meta
$ /usr/bin/time -v make CC=clang LD=ld.lld -j72 -s
Command being timed: "make CC=clang LD=ld.lld -j72 -s"
User time (seconds): 2801.78
System time (seconds): 395.48
Percent of CPU this job got: 5212%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:01.33
jemalloc:
Samples: 569K of event 'cycles:ppu', Event count (approx.): 10681965442287
Overhead Shared Object Symbol
+ 0.55% clang [.] free
+ 0.41% clang [.] malloc
$ /usr/bin/time -v make CC=clang LD=ld.lld -j72 -s
Command being timed: "make CC=clang LD=ld.lld -j72 -s"
User time (seconds): 2626.97
System time (seconds): 248.37
Percent of CPU this job got: 4774%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:00.22
And these symbols are no longer in the top 20 hottest symbols by cycle
count.
Replace musl's malloc with jemalloc. Nothing major to write home about,
but gives a ~2.5% speedup by cycle count (N=1).
Fixes #361 parent ba5054b commit 63b584a
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments