cygprofile: Orderfile-based madvise() and prefetch.

Add support for madvising and prefetching different parts of the
native library according to the orderfile. The orderfile will support
organising the library text section into three parts: code that is
used in startup only, commonly used code that is ordered, and all
other code that is not ordered. This change adds another
dummy_function_* to achieve that. The currently-experimental
MadviseRandomText() function is replace with MadviseForOrderfile which
performs more precise madvising of unordered code only as RANDOM.

When madvising for the orderfile is done, library prefetching is
disabled. This will be changed in the future to prefetch only startup
or only ordered code depending on what is more effective in
experiments.

Bug: 758566
Change-Id: I85af8e33a79d9091e282f2640c47d6c83aca7fc2
Reviewed-on: https://chromium-review.googlesource.com/923965
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538766}

CrOS-Libchrome-Original-Commit: ed73a1d57de9a443ede4b82b3d9163578362c267
5 files changed
tree: d81bec8c984060ac8bf052d977b56e852e1d78f8
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/