OSDN Git Service

Allocate executable memory backed by named mmaps on Linux.
authorIan Rogers <irogers@google.com>
Wed, 14 Feb 2018 23:39:25 +0000 (15:39 -0800)
committerNicolas Capens <nicolascapens@google.com>
Mon, 7 May 2018 19:22:32 +0000 (19:22 +0000)
commitd4e488eb6dfb31ee990fe17e4df30d9f1bc0f12b
tree375be0272f288858c810ac752528cb024569568a
parent336cdd9031807bca6c1730a6842315a3509be960
Allocate executable memory backed by named mmaps on Linux.

Executable heap memory can confuse profiling tools. Use memfd_create
on Linux, if possible, to create a named anonymous memory region.

Only enabled if LINUX_ENABLE_NAMED_MMAP is defined.

Bug b/73721724

Change-Id: I420711e4f64725ae834ab54264038683e4c445fe
Reviewed-on: https://swiftshader-review.googlesource.com/17208
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
src/Common/Memory.cpp