heaptrack: approximate malloc overhead
Open, NormalPublic

Description

it would be very nice to additionally approximate the malloc overhead, probably via pluggable code. see also measure_malloc_overhead in the heaptrack sources.

mwolff created this task.Feb 26 2016, 8:11 PM
mwolff added a comment.EditedMar 9 2016, 5:48 PM

On a 32bit machine:

requested       |       actual  |       overhead
1               |       16      |       15
2               |       16      |       14
3               |       16      |       13
4               |       16      |       12
6               |       16      |       10
8               |       16      |       8
12              |       16      |       4
16              |       24      |       8
24              |       32      |       8
32              |       40      |       8
48              |       56      |       8
64              |       72      |       8
96              |       104     |       8
128             |       136     |       8
192             |       200     |       8
256             |       264     |       8
384             |       392     |       8
512             |       520     |       8
768             |       776     |       8
1024            |       1032    |       8
1536            |       1544    |       8
2048            |       2056    |       8
3072            |       3080    |       8
4096            |       4104    |       8
6144            |       6152    |       8
8192            |       8200    |       8
12288           |       12296   |       8
16384           |       16392   |       8
24576           |       24584   |       8
32768           |       32776   |       8
49152           |       49160   |       8
65536           |       65544   |       8
98304           |       98312   |       8
131072          |       131080  |       8

On a 64bit machine:

requested       |       actual  |       overhead
1               |       32      |       31
2               |       32      |       30
3               |       32      |       29
4               |       32      |       28
6               |       32      |       26
8               |       32      |       24
12              |       32      |       20
16              |       32      |       16
24              |       32      |       8
32              |       48      |       16
48              |       64      |       16
64              |       80      |       16
96              |       112     |       16
128             |       144     |       16
192             |       208     |       16
256             |       272     |       16
384             |       400     |       16
512             |       528     |       16
768             |       784     |       16
1024            |       1040    |       16
1536            |       1552    |       16
2048            |       2064    |       16
3072            |       3088    |       16
4096            |       4112    |       16
6144            |       6160    |       16
8192            |       8208    |       16
12288           |       12304   |       16
16384           |       16400   |       16
24576           |       24592   |       16
32768           |       32784   |       16
49152           |       49168   |       16
65536           |       65552   |       16
98304           |       98320   |       16
131072          |       131088  |       16

additionally, we could try to use seccomp(-bpf) to get notified about mmap syscalls via SIGSYS, but I'm not sure whether we get access to the syscall args from the interrupt handler