Disable malloc instrumentation for VM (#1)
This patch changes the VM makefile to specify that the magic pass is to skip memory function instrumentation, and to transfer the data variables of the malloc code (thus overriding the exception we made for all other system services). We add two magic pass flags to achieve this. Since the magic pass is a big bowl of spaghetti code, ignoring whitespace changes while viewing this patch is recommended. Change-Id: I5ab83b23d8437b37c44dea99537bc202469c9df6
This commit is contained in:
parent
b7725c8552
commit
76b68f9f99
3 changed files with 487 additions and 458 deletions
|
@ -153,7 +153,7 @@ do
|
||||||
fi
|
fi
|
||||||
clean_module $n $m
|
clean_module $n $m
|
||||||
|
|
||||||
( ${TOOLDIR}/nbmake-${ARCH} -C $m all install MKBITCODE=yes OPTFLAGS.$n="${OPTFLAGS}" \
|
( ${TOOLDIR}/nbmake-${ARCH} -C $m all install MKBITCODE=yes OPTFLAGS="${OPTFLAGS}" \
|
||||||
&& echo "INFO: $m successfully instrumented."
|
&& echo "INFO: $m successfully instrumented."
|
||||||
)
|
)
|
||||||
echo
|
echo
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -18,5 +18,16 @@ LDADD+= -lsys -lexec
|
||||||
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
|
CPPFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH}
|
||||||
CPPFLAGS+= -I${NETBSDSRCDIR}/minix
|
CPPFLAGS+= -I${NETBSDSRCDIR}/minix
|
||||||
|
|
||||||
|
# For all other services, magic instrumentation involves instrumenting the
|
||||||
|
# libc malloc code, hooking its nested mmap/munmap calls, and ignoring its
|
||||||
|
# data. For VM, we need to do the exact opposite, since for VM, the malloc
|
||||||
|
# state is transferred as is. Thus, if the magic pass is enabled, tell it
|
||||||
|
# to skip the regular malloc instrumentation features.
|
||||||
|
.if !empty(OPTFLAGS:M*-magic*)
|
||||||
|
OPTFLAGS.vm?= ${OPTFLAGS} \
|
||||||
|
-magic-disable-mem-functions \
|
||||||
|
-magic-disable-malloc-skip
|
||||||
|
.endif
|
||||||
|
|
||||||
.include "arch/${MACHINE_ARCH}/Makefile.inc"
|
.include "arch/${MACHINE_ARCH}/Makefile.inc"
|
||||||
.include <minix.service.mk>
|
.include <minix.service.mk>
|
||||||
|
|
Loading…
Reference in a new issue